Skip to main content

How to set debug for Enterprise portal in MSD axapta

X++ code can be used in various parts of a page, such as Web forms, reports, and Weblets. You can debug X++ code for elements that display on pages by using the debugger for Microsoft Dynamics AX. You can debug Enterprise Portal code only on the system that is running Internet Information Services (IIS).

Setting Up Debugging for Pages
--------------------------------------------------------------------------------

To set up debugging for pages
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.

c.Click the Log On tab.

d.Select Allow service to interact with desktop.

e.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 by typing the iisreset command at the command-line window.

9.Open the Microsoft Dynamics AX Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Configuration).

10.Set the Configuration Target 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.

Debugging an Element on a Web Page
--------------------------------------------------------------------------------

To debug an element on a Web page
1.Log in to the server that is running Internet Information Services (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, and is necessary if you want to debug on a remote system.

Important
If you are debugging on a remote system, you must use console mode when connecting. Otherwise, debugging will not work.



2.Open the Microsoft Dynamics AX client.

3.Be sure that you are logged on as a user who is also one of the following:

* The user who started the session of Microsoft Dynamics AX

* The user who will set breakpoints in X++ code

4.In the AOT, locate the element that you want to debug. Typically, you will debug data sets, classes, Web forms, reports, Web reports, or weblets.

5.Set breakpoints in the X++ code by using the Code Editor. For more information, see X++ Code Editor.

6.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.

7.Open the Web page that includes the element that you want to debug. As the page is rendered, the Debugger should stop at the breakpoints that you set.

Note
If the debugger does not stop at breakpoints, you may need to restart the system that is running Microsoft Dynamics AX. After the restart, try debugging again.

Popular posts from this blog

Code to get customer Primary Address in Ax 2012

Below Code to get customer Primary Address in Ax 2012. CustTable custTable_P; DirPartyTable dirPartyTable_P; DirPartyLocation dirPartyLocation_P; DirPartyLocationRole dirPartyLocationRole_P; LogisticsLocation logisticsLocation_P; LogisticsLocationRole logisticsLocationRole_P; LogisticsPostalAddress logisticsPostalAddress_P; LogisticsPostalAddress primaryAddress_P; while select custTable_P where custTable_P.AccountNum =='ED_01029' join dirPartyTable_P where dirPartyTable_P.RecId == custTable_P.Party join dirPartyLocation_P where dirPartyLocation_P.Party == custTable_P.Party && dirPartyLocation_P.IsPrimary==NoYes::Yes join dirPartyLocationRole_P where dirPartyLocationRole_P.PartyLocation == dirPartyLocation_P.RecId join logisticsLocationRole_P where logisticsLocationRole_P.RecId == dirPartyLocationRole...

Table lists which can have large number of records in Ax 2012

If you are facing database or application performance issue then you can check these tables that may have large number of records. ECORESPRODUCTVARIANTDIMENSIONVALUE INVENTBATCH ECORESPRODUCTMASTERDIMENSIONVALUE ECORESPRODUCTMASTERDIMENSIONVALUE ECORESPRODUCT ECORESPRODUCTTRANSLATION ECORESPRODUCT ECORESPRODUCTVARIANTDIMENSIONVALUE INVENTDIMCOMBINATION ECORESRELEASESESSIONPRODUCT ECORESRELEASEPRODUCTLEGALENTITY INVENTSUMLOGTTS INVENTCOSTLISTPARM GENERALJOURNALACCOUNTENTRY GENERALJOURNALACCOUNTENTRYZAKAT_SA SMMTRANSLOG LEDGERENTRYJOURNALIZING DIMENSIONFOCUSBALANCE MARKUPTRANS INVENTTRANSPOSTING INVENTREPORTDIMHISTORY SALESPARMLINE SOURCEDOCUMENTLINE INVENTTRANS TRANSACTIONLOG INVENTTRANSORIGIN INVENTSETTLEMENT SALESPARMSUBTABLE SALESPARMTABLE SOURCEDOCUMENTHEADER SALESPARMUPDATE SQLSYNCINFO GENERALJOURNALENTRY SUBLEDGERVOUCHERGENERALJOURNALENTRY CUSTSETTLEMENT SMMACTIVITYPARENTLINKTABLE INVENTSUMDATETRANS LEDGERTRANSSTATEMENTTMP DIMENSIONFOCUSLE...

Code to get Invoice settlement data for customer in ax 2012

This is simple Code to get Invoice settlement amount data for customer payment in ax 2012. This data is after posting of data. select sum(SettleAmountCur) from custSettlement where custSettlement.TransRecId == custtrans.RecId If you want get settlement amount before posting than you can refer spectrans table.The table SpecTrans contains all the transactions marked for settlement for payment journal. while select spectrans join custtransopen join custtrans where spectrans.SpecCompany == ledgerjournaltrans.DataAreaId && spectrans.SpecTableId == ledgerjournaltrans.TableId && spectrans.SpecRecId == ledgerjournaltrans.RecId && spectrans.RefCompany == custtranssopen.DataAreaId && spectrans.RefTableId == custtranssopen.TableId && spectrans.RefRecId == custtranssopen.RecId && custtransopen.RefRecId == custtrans.RecId && custtransopen.AccountNum == custtrans.AccountNum { info...