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

Break points for debugging custom API services are not working

(5) ShareShare
ReportReport
Posted on by 441
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,390 Super User 2025 Season 2 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,039 Super User 2025 Season 2 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,039 Super User 2025 Season 2 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,097 Super User 2025 Season 2 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
    237,801 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,039 Super User 2025 Season 2 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,039 Super User 2025 Season 2 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,039 Super User 2025 Season 2 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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans