

To debug X++ code that is called from managed code, you use both the Visual Studio debugger and the Microsoft Dynamics AX debugger. After you have done this, you can then use Application Explorer to add elements from the Application Object Tree (AOT) to a Visual Studio project. When you are finished stepping through managed code, control returns to the Microsoft Dynamics AX debugger.īefore you can call X++ code from managed code, you must first add the managed code project to the model store. When code execution switches to managed code, context switches to the Visual Studio debugger. In the MorphX code editor, set the breakpoints, run your code, and use the Microsoft Dynamics AX debugger as you would typically. Open your managed code in Visual Studio and set the breakpoints.Īttach the Visual Studio debugger to the Microsoft Dynamics AX server (Ax32Serve.exe) or client (Ax32.exe) process. The high-level process for debugging from the MorphX IDE is as follows: To debug managed code that is called from X++, you use both the Microsoft Dynamics AX debugger and the Visual Studio debugger. After you have added the assembly project to the model store, the assembly classes are available from X++ code. In order to do this, you create a managed code assembly in Visual Studio and add the assembly to the model store by using Application Explorer. Debugging from MorphXĪ common development scenario is calling managed code from X++. The debugging process varies depending on whether you start debugging from the MorphX IDE or from the Visual Studio IDE. When you use managed code to develop applications for Microsoft Dynamics AX, you can: xpp files that correspond to new or modified X++ methods are refreshed on subsequent compiles to CIL. The XppIL\source\ directory is created and populated. Restart the Application Object Server (AOS). On the Application Object Server tab, select the check box that is labeled Enable breakpoints to debug X++ code running on this server. Start the Microsoft Dynamics AX Server Configuration Utility. xpp files are stored in a directory path that might resemble:Ĭ:\Microsoft Dynamics AX\60\Server\Microsoft\bin\XppIL\source\

xpp files when you debug X++ that has been compiled to CIL.

xpp file contains the X++ source code for one method of a class or table that is in the AOT. You must make the changes in X++, and then do an incremental CIL build to regenerate the. When you debug code that is called by the runAs function in Visual Studio, you cannot change the X++ source code in the Visual Studio IDE. 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. Run the code in MorphX or step through the code in the Microsoft Dynamics AX debugger. In Visual Studio, attach the debugger to the server process (Ax32Serv.exe). Use Application Explorer to open the X++ source code called by the runAs function and then set a breakpoint. Open your X++ code in the MorphX code editor and set a breakpoint on the line of code that calls the runAs function. The high-level process for debugging code called from a runAs function by using the Visual Studio debugger is as follows: Because the method runs in CIL, you must use Visual Studio to debug it. You can only use this command to run code that runs on the server. In X++, you can use the runAs function to call a static method and specify that it is executed in CIL. For more information, see Microsoft Dynamics AX Debugger. You can continue to step through the code in the debugger. When you run the code, execution stops at the breakpoint and the Microsoft Dynamics AX debugger opens. To debug X++ code, you set a breakpoint in the MorphX code editor. Runs on the server and is not executed in CIL You can use this debugger to debug X++ code that: This is the full-featured debugger that is part of the MorphX suite of tools. To debug X++ code, you use the Microsoft Dynamics AX debugger. The process for debugging X++ code varies depending on whether you are debugging standard X++ code or X++ code that is executed in Common Intermediate Language (CIL). These debugging scenarios include the following: This topic provides an overview of common debugging scenarios and information about which debugger to use. NET development are integrated, debugging may require that you use the Microsoft Dynamics AX debugger and the Visual Studio debugger depending on your development scenario. The development environment you use is either the MorphX Integrated Development Environment (IDE) or the Visual Studio IDE depending on the type of development you are doing.īecause X++ and. In Microsoft Dynamics AX 2012, development can be done in both X++ and. Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
