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 104
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



 
  • Waed Ayyad Profile Picture
    Waed Ayyad 7,495 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    Hi,

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

    Thanks
    Waed Ayyad
  • Waed Ayyad Profile Picture
    Waed Ayyad 7,495 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    Hi,

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

    Thanks
    Waed Ayyad
  • Waed Ayyad Profile Picture
    Waed Ayyad 7,495 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    Hi,

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

    Thanks
    Waed Ayyad
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 231,289 Most Valuable Professional on at
    Break points for debugging custom API services are not working
    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.
  • Verified answer
    Layan Jwei Profile Picture
    Layan Jwei 7,695 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    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
    Waed Ayyad Profile Picture
    Waed Ayyad 7,495 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    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

  • Waed Ayyad Profile Picture
    Waed Ayyad 7,495 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    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
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 15,491 Super User 2025 Season 1 on at
    Break points for debugging custom API services are not working
    Hi,
     
    to debug a custom API you must attach to Batch.exe process.
     
    Best regards,
    Mohamed Amine MAHMOUDI

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,472 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,289 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans