Sei sulla pagina 1di 17

How to Debug Enterprise Portal Code in Dynamics AX 2009

1. Log into the server that is running the AOS. 2. Open the Microsoft Dynamics AX Server Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration).

3. Create a new configuration that allows debugging.

a. Click Manage and then click Create configuration. In the Create Configuration window, name the new configuration, such as DAX Debugging. Click OK. b. On the Application Object Server tab, select Enable breakpoints to debug code X++ code running on this server. Click Apply.

4. Click OK to close the configuration window. If you receive a message about the AOS, indicate that it should be restarted. 5. Log in to the server that is running IIS and Enterprise Portal. If the system is remote, you can do this using Terminal Services. From the Start menu, click Run. Type the following in the Open box and click OK: mstsc /console This opens a console session in Terminal Services. 6. Enable desktop interaction for the World Wide Web Publish Service. a. Open the Services window for the system (Start >Control Panel > Administrative Tools > Services). b. Right-click the World Wide Web Publishing Service, and then click Properties.

b. Click the Log On tab. c. d. Select Allow service to interact with desktop. Click OK to close the properties window.

7. Open the web.config file located in \Inetpub\wwwroot\wss\VirtualDirectories\\, where is the port number of the site where Enterprise Portal is installed. Modify the file by doing the following:

a. Locate the compilation element, and then set the debug attribute to true. This reduces the chance of the Web session having a timeout error when stopped at a breakpoint. b. Save the changes.

8. Reset IIS -> IISRESET

9. Open Microsoft Dynamics Ax 2009 Configuration utility Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Configuration

10. Set the Application Object Server Instance drop-down menu to Business Connector (non-interactive use only).

11. Create a new configuration that allows debugging. a. Click Manage and then click Create configuration. In the Create Configuration window, name the new configuration, such as DAX Debugging. Click OK.

b. On the Developer tab, select Enable user breakpoints to debug code running in the Business Connector. Click Apply.

12. Click OK to close the configuration window. 13. Open the Microsoft Dynamics AX client. 14. On the Tools menu, click Options to display the Options window.

15. On the Development tab, select When Breakpoint from the Debug mode list box, and then click Apply. This enables debugging mode on the client. 16. Close the Options window.

17. Set breakpoints in the X++ code by using the Code Editor. For more information, see X++ Code Editor. 18. Open the debugger by clicking Tools, then clicking Development tools, and finally clicking Debugger. The Debugger must be open before you can run code that contains breakpoints.

Potrebbero piacerti anche