Debugging in Visual Studio

Hi Martin,

How to use debugger in visual studio ? Please guild how to do that? As it is mentioned to use F9,F10,F11 And F12 Keys.

But How to use in Visual studio? Please guide me.

If anybody who knows to use debugger in Visual studio. Please guide me too.


Place the cursor, from Where you want to debug and press F9(Debugger enables).


Open your X++ code in the MorphX code editor and set a breakpoint on the line of code that calls the runAs function.

Open Visual Studio. Use Application Explorer to open the X++ source code called by the runAs function and then set a breakpoint.

In Visual Studio, attach the debugger to the server process (Ax32Serv.exe).

Run the code in MorphX or step through the code in the Microsoft Dynamics AX debugger.

When the breakpoint is reached in the source code that is running in CIL, context switches to Visual Studio and you can continue to step through the code.

First of all, please attach a tag with your version of AX, so we know what you’re talking about.

Then tell us what you’re trying to debug. Visual Studio can be used for debugging X++ code compiled to CIL (in AX 2012), Enterprise Portal, SSRS data methods, any other C# code, XSLT and many other things…