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.
you must use Visual Studio.
The steps for debugging a service are:
- 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. - Open Visual Studio, create a new project, and in the AX Application Explorer find the methods in the
service classes that are of interest. - In Visual Studio add breakpoints where needed.
- Click Debug, and then click Attach to Process.
- Mark the checkboxes for Show processes from all users and Show processes in all sessions.
- 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. - 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.