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 :
Finance | Project Operations, Human Resources, ...
Answered

Break points for debugging custom API services are not working

(5) ShareShare
ReportReport
Posted on by 508
I've created a custom API service using X++ in D365 F&O I could post JSON payload from Postman to the API endpoints successfully I set breakpoints for the code of the service api class method but the breakpoints aren't working  didn't hit when I send a JSON payload from Postman. Some guides suggest attaching to w3wp.exe
for debugging 

What I done so far:

1- The custom service API is now exist under Services the AOT 
2- I set breakpoints inside the code of method 
3- I open the usconeboxax1aos.cloud.onebox.dynamics.com from IIS

The break point is display this warning message ( The breakpoint will not currently be hit. No symbols have been loaded for this document).

 can you show me the right way to debug the custom api service in Visual Studio ? 

Thanks



 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,801 Super User 2026 Season 1 on at
    Hi,
     
    to debug a custom API you must attach to Batch.exe process.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,
    Check if your model is added to the models that are included in the debugging, to check it go to Extensions Menu -- Dynamics 365 --Options --- Dynamics 365 --- Debugging --- Check if your model is checked or not.

    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Suggested answer
    Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,
     
    Check if your model is added to the models that are included in the debugging, to check it go to Extensions Menu -- Dynamics 365 --Options --- Dynamics 365 --- Debugging --- Check if your model is checked or not.

    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue

  • Verified answer
    Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi,

    if you go to:
    Extensions - Dynamics 365 - Options  then Dynamics 365 - Debugging
    Then you have two options:
    1. It's either, you untick the tick box near the red arrow, where it will include all modules to debug from
    2. you tick the tickBox in red, then you choose the modules u need near the blue arrow and tick their boxes (For example: your model, application suite...etc)and make sure the element you want to debug is inside your project


    option 2 is more preferred for performance.


    Then you can Debug via IIS express when you click "Attach to process" and it should work (no need for batch)


    Also make sure you put your break point at the beginning of the service, to make sure that it's not being hit because of code.

    Thanks,
    Layan Jweihan
    ​​​​​​​Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Suggested answer
    Martin Dráb Profile Picture
    239,036 Most Valuable Professional on at
    To summarize it (and correct some wrong information), you must attach debugger to the process running the code that you want to debug. Typically it's IIS Express (iisexpress.exe), but it may also be IIS (w3wp.exe).
     
    It would be Batch.exe if you debugged a batch job, but it's not your case.
     
    Note that you can even attach the debugger to several processes, if you aren't sure which is the right one.
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 658

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 468 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 333 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans