Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support teams Worldwide

Debugging Services in AX 2012

Debugging Services in AX 2012

Rate This
  • Comments 3

Regardless of the adapter type you choose, services in AX 2012 run as IL code - even if you are using the file adapter.  To debug IL code
you must use Visual Studio.

The steps for debugging a service are:

  1. On the AOS, install the AX Application Explorer from the Microsoft Dynamics AX CD by choosing the
    component Developer Tools, and then click Visual Studio Tools.  If the AX debugger is not installed,
    you will also need to install it.
  2. Open Visual Studio, create a new project, and in the AX Application Explorer find the methods in the
    service classes that are of interest.
  3. In Visual Studio add breakpoints where needed.
  4. Click Debug, and then click Attach to Process.
  5. Mark the checkboxes for Show processes from all users and Show processes in all sessions.
  6. Select AX32Serv.exe and click Attach.The Ax32Serv.exe won't be able available if you are not debugging on the AOS, so
    you need to be on the AOS.
  7. In a separate instance of VS (so have two different projects/solutions open) run the code that calls
    the service.One instance to run the code that
    calls the service and another instance of VS to do the debugging.  By
    having two instances open, you can leave the debugging instance attached to the
    AOS while you run the service code over and over again.
Leave a Comment
  • Please add 4 and 2 and type the answer here:
  • Post
  • Hi,

    Thanks for this post.

    But I wonder :

    you need to be on the AOS.

    Normally developer does not work in AOS directly, is there any workaround to debug IL from client VS?

    Thanks.

  • You could try remote debugging in VS but yes otherwise you will need to be on the AOS.

  • i interrupt executing job now i am facing issue like when i open AX debugger is opening ?

    Please provide some solution.

Page 1 of 1 (3 items)