Debug X++ Code for Retail [AX 2012]
Updated: April 28, 2014
Applies To: Microsoft Dynamics AX 2012 R3
You can use the X++ debugger to debug from Microsoft Dynamics AX for Retail POS to Commerce Data Exchange: Real-time Service to Microsoft Dynamics AX, or from commerce runtime to Real-time Service to Microsoft Dynamics AX. Perform the following steps to debug code that runs on the client:
-
Create a local client configuration.
-
Create a Business Connector configuration.
-
Update the Business Connector configuration in the registry editor.
Then you can set breakpoints in your X++ code and begin debugging.
Caution |
|---|
|
To debug code that runs on the server, you must also configure debugging on the AOS server. For more information, see How to: Debug X++ Code Running in .NET Business Connector. |
To Create a Local Client Configuration
-
Open Microsoft Dynamics AX 2012 Configuration.
-
In Configuration Target, select Local client.
-
Click Manage, and then click Create configuration…
-
Enter a configuration name. For example, DebugClient.
-
Select Active configuration, and then click OK.
-
Click the Developer tab. Select Enable user breakpoints to debug code in the Business Connector.
To Create a Business Connector Configuration
-
If you are not already in the Microsoft Dynamics AX Configuration Utility form, open Microsoft Dynamics AX 2012 Configuration.
-
In Configuration Target, select Business Connector (non-interactive use only).
-
Click Manage, and then click Create configuration…
-
Enter a configuration name. For example, DebugBCNet.
-
Select Active configuration, and then click OK.
-
Click the Developer tab. Select Enable user breakpoints to debug code in the Business Connector.
-
Close the utility.
To Update the Registry Editor
-
Open Windows Command Processor.
-
Enter regedit.exe.
-
Right-click the key that corresponds to the Business Connector configuration you created in the previous procedure, point to New, and then click String value.
Note For example, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dynamics\6.0\Configuration\DebugBCNet.
-
Right-click the new value, and then click Rename. Enter debug_across_os_session.
-
Double-click debug_across_os_session.
-
In Value data, enter 1. Click OK.
-
In Windows Command Processor, enter IISReset, and then press Enter.
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).
