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
Gopinath

One thought on “Debug a plugin or workflow in CRM 2011/2013/2015

  1. VJ July 19, 2016 / 6:14 am

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

    Like

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s