There are few steps needed to be able to debug managed X++ execution using VS:
- Breakpoints should be enabled on server (in AOS configuration).
- Visual Studio should be started with elevated permissions (run as administrator).
- Visual Studio should be attached to Ax32Serv.exe process (AOS process).
After that you can locate the source code and place the breakpoint. This can be done either using Application Explorer, or by opening .xpp source file directly from the [AX server path]\bin\XppIL\Source folder. Each method of each class or table has a separate .xpp file that is named [ClassName].[MethodName].xpp.
And that’s it. Now the debugging will happen is visual studio. Call stack, watches, etc. are also available.
Thanks for this post, that is really interesting! :)
ReplyDeleteHi, thanks for your post. I have tried, but when I set the break point at the source code, when i put my mouse over the breakpoint, it shows"The breakpoint will not currently be hit. No symbols have been loaded for this document."
ReplyDeleteCan you help me how i can solve it?
thanks !
Jie
Hi, Thanks for the post. It worked. So it looks like we can not do the debugging from client machine ?
ReplyDeleteHi
ReplyDeleteWhat do I need to do to come around this message: "The breakpoint will not currently be hit. No symbols have been loaded for this document."
It works sometimes if the AOS is restarted.
But with hotswap enabled I thought this should be avoidable!
spc
Same problem here. Any solution?
DeleteSame problem here. Any solution?
DeleteBut is it just a message or you're not hitting the breakpoint actually?
DeleteThe message can appear because CLR lazy loads assemblies, so it may be not loaded at the time you set the breakpoint but it will be loaded when the execution will come to you method and the breakpoint will be hit.
So it means, this message is kind of ok if you still hitting this breakpoint.
Delete