debuggingaxaptadynamics-ax-2012

How to debug on server side AX 2012 R2


I have highly customized bank statement functionality. The transfer logic starts with calling Controller, the controller extends from SysOperationServiceController.In the controller's main method i have this piece of code :

public static void main(Args args)
{
    BankStatementTransferController_SI  controller;

    controller = BankStatementTransferController_SI::newFromArgs(args);
    controller.buildQuery();
    controller.startOperation();
    controller.refreshCallerRecord();
}

And i am able to debug this, until startOperation method. The main logic is executed in other class, that class extends from RunBaseBatch. Both classes have the "RunOn" property set on "Called from". I set breakpoints in both classes but after controller.BuildQuery() the process finish and it doesn't stop on any breakpoints.

The question is how to debug this class ?


Solution

  • First, try going to Tools>Options>Developer Options, and then uncheck Execute business operations in CIL and see if that allows your breakpoints to be hit.

    If that doesn't work, then you use Visual Studio with the AX visual studio tools installed, which can be installed using the AX Installer, and attach to Ax32Serv.exe. Then you place a breakpoint on an AOT object from inside Visual Studio using the AX VS tools. See:

    Then your actual debugging is performed using Visual Studio and not the AX debugger.