Today I would like to talk about an interesting question I saw last week, how to debug in phone/tablet client session.
Debugging is the process of finding and correcting errors. With Visual Studio Code and the AL Language extension, you get an integrated debugger to help you inspect your code and verify that your application can run as expected. You can start a debugging session by pressing F5. For more information about Debugging in Visual Studio Code, see Debugging
In VS Code:
In the BC Web Client:
We know that the UI of phone/tablet client is different from Web Client, so if we want to debug on phone/tablet client, what should we do?
As you might know, we can open the Business Central tablet client or the Business Central phone client by using a browser from a device that has a network connection.
You can find more details about Opening the Business Central Tablet or Phone Client from a Browser – Business Central | Microsoft Learn
Yes, we can do the same thing while debugging.
For example: https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox21/phone?redirectedfromsignup=1&debuggingcontext=23aTx-XewU27S-TEOyGrwA&ApplicationGatewayAffinity=61%252FLVQxx
In phone client session:
In tablet client session:
Give it a try!!!😁
You can find more about Debugging in AL in Microsoft Learn (Docs).
Hope this will help.
Thanks for reading.