To enable X++ debugging in the current user session in Microsoft Dynamics AX 4.0, follow these steps:
1. On the server that is running Internet Information Services (IIS), open a console session (also known as session 0). To use Terminal Server to do this, click Start, click Run, type mstsc /console in the Open box, and then click OK. Then, start Microsoft Dynamics AX 4.0 in the Terminal Server session.
2. Set the .NET Business Connector configuration and the client configuration to enable breakpoints when you run the Business Connector. To do this, follow these steps:
a. Click Start, click Run, type Control admintools, and then click OK.
b. Double-click Microsoft Dynamics AX Configuration Utility.
c. In the Configuration target list, click Business Connector (Non-interactive use only).
d. On the Developer tab, click to select the Enable user breakpoints to debug code running in the business connector check box and the Enable global breakpoints to debug code running in the business connector check box.
e. Click Apply. Then, click OK.Repeat step a through step e for the local client configuration in the Configuration target list.
3.Enable debug mode. To do this, follow these steps:
a.On the Tools menu, click Options.
b.Click the Development tab.
c. In the Debug mode box, click When Breakpoint.
d. Click Apply, and then close the Options dialog box.
4.Locate the code that you want to debug. Before the code that you want to debug, type the keyword breakpoint.
5.Manually start the debugger. To do this, click Tools, point to Development tools, and then click Debugger.
6.Enable desktop interaction for the World Wide Web Publishing Service. To do this, follow these steps:
a. Click Start, point to All Programs, point to Administrative Tools, and then click Services.
b. Right-click World Wide Web Publishing Service, and then click Properties.
c. Click the Log On tab.
d. Click to select the Allow service to interact with desktop check box.
e. Click OK to close the World Wide Web Publishing Service (Local Service) dialog box.
7. Make sure that the user who is logged on to the computer is one of the following users:
•The user who is running the Web application pool
•The user who starts a session in Microsoft Dynamics AX 4.0
•The user who set up breakpoints in Microsoft Dynamics AX 4.0