Skip to main content

DEBUGGING THE CODE IN AX 2012




In Microsoft Dynamics AX 2012, development can be done in both X++ and .NET managed code, X++ is an object-oriented language with similarities to C#. X++ is part of the MorphX development platform that is used to construct accounting and business management systems.
The process for debugging X++ code varies depending on whether you are debugging standard X++ code or X++ code that is executed in Common Intermediate Language (CIL).
in this article we are going to cover standard X++ code debugging
Standard X++ Code debugging
To debug X++ code, you use the Microsoft Dynamics AX debugger. This is the full-featured debugger that is part of the MorphX suite of tools. You can use this debugger to debug X++ code that:
  • Runs on the client Side
  • Runs on the server side and is not executed in CIL
To debug X++ code, you set a breakpoint in the MorphX code editor.
  1. In the AOT, create a new Job.
  1. Place a breakpoint on line from you need to start debugging
 

  1. Press F5 to compile and run the code. The debugger will starts.
 

  1. Press F10 to step over each line of code or F11 to Step Into the Code
 In above picture we can see there are two types of breakpoints
  1. We can type the Breakpoint above the line from where we need to start debugging (It will work on application level)
  2. Secondly we can place breakpoint by pressing F9 or simply click on left side bar of the line of code where we need to place break point (It will work on session level)
In next article we will cover debugging of the X++ code that is executed in Common Intermediate Language (CIL)


Comments

Popular posts from this blog

D365 : ENABLE AND DISABLE IN LIST PAGE

 here i have added 4 button in salesQuotationlistpage. now i need to enable/disable button according status. so i have Extensionof  of class SalesQuotationListPageInteraction and modify setButtonEnabled method by Chain of Command //list page button enable and diable in listpage interation class [ExtensionOf(classStr(SalesQuotationListPageInteraction))] final class SQTableinimathod_Extension {     protected void setButtonEnabled()     {                SalesQuotationTable SalesQuotationTable;         CustQuotationJour   CustQuotationJour;         CustQuotationConfirmJour  CustQuotationConfirmJour;               next setButtonEnabled();         SalesQuotationTable SalesQuotationTable1 = this.listPage().activeRecord(queryDataSourceStr(SalesQuotationListPage, SalesQuotationTable));         selec...

An error occurred during report data sets execution D365 For finance and operations

  Hi all, small tip. I faced this issue, when I extend the custom report in D365 for finance and operations. During development on onebox     Solution was simple, restart IIS services Restart Reporting Services. Happy Daxing.

CODE TO PDF IN AX 2012

static void Job1(Args _args) {         PurchPackingSlipController      ssrsController = new SrsReportRunController();         TradeDocumentReportContract     purchPackingSlipContract = new TradeDocumentReportContract();         SRSPrintDestinationSettings     printerSettings;         VendPackingSlipJour             VendPackingSlipJour;         Args                            args;         //select the latest record based on create date         while select VendPackingSlipJour             order by VendPackingSlipJour.createdDateTime DESC             where VendPackingSlipJour.PackingSlipId == 'LJ-01'         ...