AX – D365FO – How to use Trace parser as a debugger #d365fo #ax #msdyn365fo

Trace parser is a very important utility program that helps developers to debug an application.

It shows every SQL statement and every method called by applicatione followed by its call stack code

These are the instructions to starts Tracing an application

Enable Trace Parser Database

Go to “System administration” > “Check Performance tools”

Leave defaul parameters, click Validate ans Save

THis will generate a Trace Paser database on locahost SQL Server machine. This will also bind SQL server queries parameters.

Go to the application you want to trace and before starts anything click on “Trace”

Give it a name such as test…. and click on “Start Trace”

Do whatever you want in you application and when finished click on “Stop Trace”

“Download Trace”

Save it where you want

Search “…parser…” into Windows menu and open Trace Parser

The first time you use it, you must register a new databasea new. Just do it

Choose localhost > traceparser ad Register

After database creation import the trace log clicking on “Import trace”

………….Wait while importing………

In the “Select grouping” listview select the domani of the user you are logged into D365FO. In my case it’s altitudo.com

In “SQL” tab you can see every SQL statement and the method it was called from with the entire call stack code.

In X++ tab you can see every method used by application with its call stack. The are many other data analysis like the column “Count” that tells you how many times the method was called

In the “Call Tree” tab you can see all the methods used displayed in a tree view. The tree view shows the hierarchy of the methods and the link there is between them

5 responses to “AX – D365FO – How to use Trace parser as a debugger #d365fo #ax #msdyn365fo”

  1. Dian Avatar
    Dian

    Hi Marco,

    Thanks for your sharing. I tried record trace from sandbox, but my results:
    1. The grouping is ‘unknown user’
    2. The call stack shows classes but empty. As if the tracer did not detect the class name.
    3. SQL shows blank

    I also tried trace in DEV, the tracer showed more results, but none of them are useful. For example:
    1. Call stack: GetMenuStructure, PrepareClientPayload. The real class which run the process did not show.
    2. There is no SQL
    3. Batch job which was triggered also not shown in the tracer.

    Can you help, what is wrong with my test?

    Like

    1. Marco Saad Avatar
      Marco Saad

      Are you using an admin user to do the record trace?

      Like

      1. Dian Avatar
        Dian

        Hi Marco,

        Thanks a lot for your fast respond.
        1. In sandbox, I am one of user with Sys admin role. Note that I am vendor, so my account is not the same domain as tenant.
        2. In DEV, I am also one of user with Sys admin role. And the DEV is belong to us, so it is same domain.

        Like

    1. Dian Avatar
      Dian

      Hi Marco,

      Yes, is working with new VM. Thanks.
      Although I did not able to install the missing provider in our VM.
      Anyway thanks a lot.

      Like

Leave a comment