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