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.

*This post is locked for comments