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...
Answered

Debugging Base Application (GoToDefinition)

(0) ShareShare
ReportReport
Posted on by 85

Hello Business Central experts,

I am attempting to debug an issue that is occurring with a particular Purchase Order (the purchase order has an error on line 390,000) but that line does not exist. So in order to dig into this issue more I would like to run the debugger as the Test Report Process is running and maybe I will be able to determine the issue.

Now what I have done is created a basic AL project that has a launch.JSON that points to the Sandbox Environment that I want to test, next I used Go-To Definition to access the Purchase Order Page and I set a few breakpoints on Posting and test Report. But the debugger does not fire. I'm not sure if its worth noting but I also tried attaching breakpoints to Codeunit Test Report Print. Additionally I can debug code that I have written in a page extension for example.

I was wondering if there is an issue with my method? Or can I not debug this cloud sandbox? I have attached the text in my Launch file. This is on Platform 14.0 Runtime 3.0 (Spring release)

"type""al",
            "request""launch",
            "name""This is the name of my sandbox",
            "startupObjectId"22,
            "startupObjectType""Page",
            "breakOnRecordWrite"false,
            "breakOnError"true,
            "launchBrowser"true,
            "enableLongRunningSqlStatements"true,
            "enableSqlInformationDebugger"true,
            "sandboxName""Sandbox Name Here",
            "tenant""This is the ID of my Tenant"
 
I have the same question (0)
  • Suggested answer
    Robert B. Profile Picture
    257 on at

    Hi James,

       Please try these steps: https://www.kauffmann.nl/2019/04/09/debug-without-publishing/

    Cheers,

    Robert

    If this helps in resolving your issue, please verify my answer!

  • James_French Profile Picture
    85 on at

    Hello Robert, I have followed these steps but it does not break to debugger. The error is thrown when I run the Test Report function in the PO, is this just not possible to do?

  • Suggested answer
    Robert B. Profile Picture
    257 on at

    Here's a good example where you have some visuals on how to attach your debugger.

    Set your flag to break on error, reproduce your problem in your environment and then use the attach to as pictured there.

    Let me know if that works.

    Cheers,

    Robert

    If this helps in resolving your issue, please verify my answer!

  • Verified answer
    Alexey Finogenov Profile Picture
    1,659 on at

    Regarding debug online BC standard code, I’ve found that we should use a ‘debug extension’ way… find the event that nearest to the problem standard code lines, subscribe to the event..

    https://community.dynamics.com/business/f/dynamics-365-business-central-forum/370681/info-how-to-debug-on-business-central-cloud-version

  • James_French Profile Picture
    85 on at

    Hello Alexey, thank you for this. I was able to do the sort of debugging I was looking for with this method.

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 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans