web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

how to debug AL Code?

(0) ShareShare
ReportReport
Posted on by 2,100

Hi All,

Can anyone suggest How to debug AL code using Visual Studio Code?

Please suggest except Microsoft Docs and https://code.visualstudio.com/Docs/extensions/debugging-extensions. Because I tried the all steps mentioned in these given two sources, But still I can not able to debug my code in expected way.

Thank You.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi,

    Are you looking to debug in Sandbox, then its simple

    1. Mark your code where you want to stop the debugger by pressing F9 function key as a breakpoint on that line.

    2. Click on Run > Start Debugging or Press F5 function key to start debugger.

    pastedimage1661346675697v1.png

  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

    Hi,

    Open Visual Studio

    Go>Run>Start Debugging

    pastedimage1661346421927v1.png

    After that, mark the break point on the events where you want to debug the code and then open the BC D365 and do the process, system automatically go to the event where you marked the event. for more clarity refer the below image as example.

    pastedimage1661346672747v2.png

    after that 

    F11 or down arrow --> debug the code line wise in detail

    F10 or curve arrow--> debug the code only line wise

    F5 or Up arrow--> debug the code where breakpoints enables. RED dot is called break point and shortcut key is F9.

    Regards

    Amit Sharma

    www.erpconsultors.com

    https://www.linkedin.com/in/amit-sharma-94542440/

    Press Yes button, if solution is useful.

  • Suggested answer
    Robyn2018 Profile Picture
    Most Valuable Professional on at

    Hi,

    If you want debugger in Saas Production environment, you must follow an special instructions.

    You can see my blog here with instructions (in Spanish) but probably you can understand it:

       

    Roberto Corella

  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, I recommend Microsoft Learn's materials.

    Debug and deploy your extension in Dynamics 365 Business Central

    https://docs.microsoft.com/en-us/learn/modules/debug-deploy-extension/

    And for Snapshot Debugging (Debugging in Cloud Production)

    https://yzhums.com/13350/

    Hope this helps as well.

    Thanks.

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans