How to: Configure the Debugger to Debug a Report Data Provider Class
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
This topic provides steps to configure the debugger before you debug a report data provider (RDP) class. This scenario requires special setup because it involves X++ code and code that is managed by the .NET Framework.
By using the Visual Studio reporting tools for Microsoft Dynamics AX, you can bind a report to an X++ RDP class. This allows you to process data using X++ business logic that executes on the Application Object Server (AOS). X++ code is debugged using the MorphX debugger. The RDP class is called with a service that is compiled into Microsoft Intermediate Language (MSIL). MSIL is debugged and managed by the .NET Framework.
The debug process must occur in X++ code and managed code because of the following two conditions:
The X++ code, that is not managed, runs on the AOS.
The X++ code is called using a service and the service is compiled into MSIL.
These steps apply to debug a Microsoft Dynamics AX report executing in the following environments:
SQL Server Reporting Services (SSRS) Report Manager
Microsoft Dynamics AX client
In the following sections, you determine which AOS service account to debug the RDP class in and add the account to the Microsoft Dynamics AX Debugging Users group. You create a server configuration with debug enabled and then you can add breakpoints in your code.
To determine the AOS service account
From the Start menu, point to All Programs, click Administrative Tools, and then click Services.
In Services, right-click the Microsoft Dynamics AX Object Server service and then click Properties.
In the Properties window, on the Log On tab, the AOS service account is specified in the This account field.
To add the AOS service account to the debug group
From the Start menu, point to All Programs, click Administrative Tools, click Computer Management, and then click Local Users and Groups.
In Local Users and Groups, double-click Groups, right-click Microsoft Dynamics AX Debugging Users and click Add to Group.
In the Properties window, click Add and add the AOS service account to the group.
Restart the machine.
To configure for debugging
From the Start menu, point to Administrative Tools and then click Microsoft Dynamics AX Server Configuration.
In Microsoft Dynamics AX Server Configuration Utility, click the Manage button, and then click Create configuration.
In the Create Configuration window, enter a Configuration name like Debug and then click OK.
On the Application Object Server tab, select Enable breakpoints to debug X++ code running on this server and Enable global breakpoints to debug X++ code running in batch jobs.
Click OK and when prompted to restart the AOS service click Yes.
From the Start menu, point to All Programs, click the Microsoft Dynamics AX folder, and then click the Microsoft Dynamics AX Debugger.
From the Microsoft Dynamics AX Development Workspace, from the Tools menu, click Options. On the Development tab, click the Debug mode dropdown, and then select When Breakpoint.
To add a breakpoint
- In Code Editor, in the processReport method of the RDP class to debug, add the breakpoint; keyword.
To stop at the breakpoint you set, AX Debugger must be running when you run the report.
Send feedback about: