Debugging workflow event handlers in Dynamics Ax 2012

To debug X++ code written in event handler classes of a workflow, you need to follow these steps:

1. Run an incremental IL if you have made any changes to the class.

2. Visit Application explorer in visual studio and open the class you want to debug.Applicationexplorer in visual studio

3. In VS goto Debug option and click on Attach to Process and change code type to Manage v4.0

Attached to process for debugging

4. Select show all process in all sessions and select Ax32Serv.exe
(note: you might see more than one Server process, if you cant determine which one to select then select all Ax32Serv process) and attach.

Attach to Ax32serv process

 

final step to attachment

5. Now place breakpoints on the code you want to debug and run the workflow, execution will stop in visual studio once the event is fired.

 

For more information visit : Msdn How to: Debug X++ Code in Workflow [AX 2012]

ProTip: If you would like to see the workflow going into and out of the process que use the form Tutorial_WorkflowProcessor and run it before starting the workflow.Tutorial workflow processor

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s