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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Debug Business Central RESTful API

(1) ShareShare
ReportReport
Posted on by 42

Having problems attempting to debug BC REST API code units.

There are a lot of web posts (see bottom of post for number of references) but seems to primarily apply to application. 

I have tried various combinations - and at times it seems to be doing something however I tend to lock up my local Docker instance. I think it might be triggering breakpoints when service is called but doesn't fire?

There seems to be an order - first debug (F5) then Ctrl-Shift-F5 (debug without publishing). Does this apply to REST code unit web services as well?

Launch.json:

        {

            "name""Attach Debug Server",
            "type""al",
            "request":  "attach",
            "server""">http://localbc",
            "serverInstance""BC",
            "authentication""UserPassword",
            "breakOnError"true,
            "breakOnRecordWrite"false,
            "enableSqlInformationDebugger"true,
            "enableLongRunningSqlStatements"true,
            "longRunningSqlStatementsThreshold"500,
            "numberOfSqlStatements"10,
            "breakOnNext""WebServiceClient"
        },
I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

  • Gabor Faludi Profile Picture
    302 on at

    hi ,

    whats your question here ?

    tx

  • Xmeister Profile Picture
    42 on at

    I am trying to debug a BC RESTful Web Service.. so basically add a breakpoint in code and be able to step through it when it is called via a service request via something like Postman.

  • ldiane Profile Picture
    15 on at

    Did you find a solution?

  • Suggested answer
    Arnold Gantuangco Profile Picture
    20 on at

    This BC(19) configuration below works for me with Postman request post using ODATA V4 unbound action and VS AL codeunit debugging.

    Just run VS (F5 - debugging and choose attach configuration). Then when you post request in postman, it will hit the breakpoints in VS AL.

    pastedimage1648778299338v1.png

  • AD-13081151-0 Profile Picture
    27 on at
    I am also having this problem. Cant attach the debug to the codeunit with web requests... 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans