I have done this on a single system.
This article explains:
- How to debug X++ code for Microsoft Dynamics Ax 2009 Enterprise Portal
- How to debug X++ code using .Net Business Connector
- How to setup and configure to debug X++ code for Microsoft Dynamics Ax 2009 Enterprise Portal
- How to debug Microsoft Dynamics Ax 2009 Enterprise Portal (EP)
Log in to the server that is running the AOS.
2.
Open the Microsoft Dynamics AX Server Configuration utility. To open Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration.
3.
Create a new configuration that allows debugging.
3.a.
Click Manage then Create configuration. Give a name to the new configuration in the Create Configuration window then click OK.
3.b.
On the Application Object Server tab, select Enable breakpoints to debug code X++ code running on this server. Click on Apply button.
4.
Click on OK button to close the configuration window. You will get a message that indicates AOS is going to be restarted.
5.
Actually debugger works on the server where IIS is running and Enterprise Portal is hosted. I used a single system and all the things are on the same system. If you are accessing a system remotely using Terminal Services then from the Start menu click Run. Type mstsc /console in the Open text box and click OK
This opens a console session in Terminal Services. Console session is required to debug Ax EP
6.
The World Wide Web Publish Service should be enabled.
6.a.
Open the Services window for the system. To open it Start > Control Panel > Administrative Tools > Services.
6.b.
Right-click the World Wide Web Publishing Service and click Properties.
6.c.
Click the Log On tab.
6.d.
Select Allow service to interact with desktop as shown below.
6.e.
Click on OK button to close the properties window.
7.
Open the web.config file located in
8.
Now do the following:
Find out the compilation element then set the debug attribute to true.
8.b.
Save the changes.
9.
Reset IIS by typing the iisreset command at the command-line window or type iisreset in Start > Run > Open text box then click on OK button.
10.
Open the Microsoft Dynamics AX Configuration utility. To open it Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Configuration.
11.
Set the Application Object Server Instance drop-down menu to Business Connector (non-interactive use only).
12.
Create a new configuration to allow debugging.
12.a.
Click on Manage button then click Create configuration. In the Create Configuration window, name the new configuration then click OK button.
12.b.
On the Developer tab, select Enable user breakpoints to debug code in the Business Connector and Enable global breakpoints to debug code running in the Business Connector or client then click on Apply button.
13.
Click on OK button to close the configuration window.
14.
Open the Microsoft Dynamics AX client.
15.
On the Tools menu, click Options to display the Options window.
16.
On the Development tab, select When Breakpoint from the Debug mode list box, and then click Apply. This enables debugging mode on the client.
17.
Close the Options window.
18.
Open the Microsoft Dynamics AX client.
19.
Now decide the element you want to debug. Lets say you want to debug a class method. Open the method in code editor and write breakpoints where you want to set a breakpoint.
20.
Open the Debugger window manually. To open debugger manually click on Tools > Development Tools > Debugger.
21.
Now execute the web form where the method has been invoked. It should work. On my system it is working perfectly.
If there is any problem please let me know. Definitely I will help you.
No comments:
Post a Comment