Bojensen Blogs

Debugging managed code in AX 2012

 

Since a lot of X++ code is now executed in CLR there should be a possibility to debug it. The standard AX debugger cannot help here since it is capable of debugging interpreted code only. However, Visual Studio 2010 can do the job.

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]binXppILSource 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.

Dynamics AX Daily: Debugging managed code in AX 2012

Comments are closed.