Debug Web Part Pages
Debug X++ code in forms, reports, and other elements that display on Web part pages by using the debugger in Microsoft Dynamics AX.
-
Connect to the Enterprise Portal server that is running the Web site. For information about setting up a server, see Install an Enterprise Portal server.
-
Open the Configuration Utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Configuration Utility).
-
Modify the configuration by doing the following:
-
Select Local client from the Configuration target list box.
-
Click Manage > Create configuration, type "Axapta" in the Configuration name box, and then click OK.
-
On the Developer tab, select Enable user breakpoints to debug code running in the Business Connector, select sys from the Application object layer to open list box, and then click Apply.
-
Select Business Connector (non-interactive use only) from the Configuration target list box, and then repeat steps b - c.
-
Click OK.
-
-
Open the Microsoft Dynamics AX client.
-
On the Tools menu, click .
-
On the tab, select from the list box, and then click .
-
Close the dialog, and then close the client.
-
Open the web.config file located at <drive:N>:\Inetpub\wwwroot, and modify the file by doing the following:
-
Locate the compilation element, and then set the debug attribute to true.
-
Locate the trust element, set the level attribute to WSS_Medium, and then set the processRequestInApplicationTrust attribute to false.
-
Save the changes.
-
-
Reset Internet Information Services (IIS) by typing the iisreset command at the command-line window.
-
Connect to the Enterprise Portal server that is running the Web site.
Note If you connect to the server using Remote Desktop Connection, you must click Start > Run and type mstsc.exe /console in the Open box to connect remotely and debug an element.
-
Open the Microsoft Dynamics AX client.
-
In the Application Object Tree (AOT), locate the element you want to debug. Web forms and reports are located under the Web node.
-
Set breakpoints in the X++ code by using the code Editor. For more information, see X++ Code Editor.
-
Open the debugger by clicking Tools > > .
-
Navigate to the Web site.
To locate the URL, open the Navigation Pane, and then click > > > . The URL is displayed in the field.
-
Open the Web part page that includes the element that you want to debug, and then click in the element to display the X++ code in the debugger.
For more information about using the debugger, see Microsoft Dynamics AX Debugger.