Tuesday, June 4, 2013

Steps for debugging AIF services

In Dynamics AX 2012, debugging AIF code requires certain operations to be performed before you can actually debug the code. Follow these simple steps to debug the AIF service code using Visual Studio


  1. Open Visual Studio
  2. From Application Explorer (Ctrl + D), go to classes, Open the class you want to debug, expand the methods node, right click and select "View code"
  3. Before putting the breakpoint, Go to the Debug menu, select Attach to process, point to Ax32Serv.exe and then click Attach button.
  4. On the status bar, you will see loading symbols...
  5. Once all the symbols are loaded and status bar shows "Ready", put the breakpoint and run your service (either by third party app or batch job) and then you will be able to debug the code.
Also, note that while debugging the code, you will not be able to see the values for the variables by simply hovering the mouse over the variable so you need to insert the variable to the watch list either by using drag/drop or by right click and choosing add to watch.

No comments:

Post a Comment