Workflows in Dynamics 365 for Finance and Operations can be debugged by attaching the debugger in Visual Studio to the Batch.exe process. This is because the workflow infrastructure uses batch processing on AOS to execute workflows. Learn more >>
In order to start debugging of a workflow:
- Open Visual Studio as Administrator.
- In Visual Studio attach to the Batch.exe process in the Debug menu.
- Put the breakpoints in a built-in workflow class (e.g. in the beginning of the SysWorkflowQueue.resume() or SysWorkflowWorkItem.create() methods) or in your WF event handler code.