다음을 통해 공유


Debug X++ Code for Retail

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

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.

Warning

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

  1. Open Microsoft Dynamics AX 2012 Configuration.

  2. In Configuration Target, select Local client.

  3. Click Manage, and then click Create configuration…

  4. Enter a configuration name. For example, DebugClient.

  5. Select Active configuration, and then click OK.

  6. Click the Developer tab. Select Enable user breakpoints to debug code in the Business Connector.

To Create a Business Connector Configuration

  1. If you are not already in the Microsoft Dynamics AX Configuration Utility form, open Microsoft Dynamics AX 2012 Configuration.

  2. In Configuration Target, select Business Connector (non-interactive use only).

  3. Click Manage, and then click Create configuration…

  4. Enter a configuration name. For example, DebugBCNet.

  5. Select Active configuration, and then click OK.

  6. Click the Developer tab. Select Enable user breakpoints to debug code in the Business Connector.

  7. Close the utility.

To Update the Registry Editor

  1. Open Windows Command Processor.

  2. Enter regedit.exe.

  3. 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.

  4. Right-click the new value, and then click Rename. Enter debug_across_os_session.

  5. Double-click debug_across_os_session.

  6. In Value data, enter 1. Click OK.

  7. In Windows Command Processor, enter IISReset, and then press Enter.

See also

Microsoft Dynamics AX Debugger

How to: Debug X++ Code Running in .NET Business Connector