Monday, 31 August 2015

Debug a plugin or workflow in CRM 2011/2013/2015

From most of the CRM learners, I hear a question that is very often is How to Debug a plugin/Custom Workflow.
Here are the steps that is needed to hit your first break point in the code on your local machine.
  • Make sure that your plug-in is signed (For Custom workflow this step is optional)
  • Rebuild the plug-in/Custom workflow.
  • Copy the .pdb file and your .dll file to Microsoft Dynamics CRM\server\bin\assembly (check your Dynamics CRM installation folder, generally C:\Programe Files\)
  • Register the Plug-in/ workflow assembly using the Registration Tool
  • Open the application in Visual Studio and click on Debug -> attach
  • Select w3wp.exe (for plugins) and CRMAsyncService processes( for workflows).

Now go ahead and perform the action in the CRM UI that will trigger the plugin step or the workflow. You will the breakpoint is hit.
Hope this helps.
Happy CRM'ing

1 comment:

  1. How to debug workflow if CRM is hosted on some other server?