How to Debug Custom Workflow Activity and Async Plug-In in MSCRM

One of the most common requirement while developing, testing and/or troubleshooting is the ability to debug our code. This is not an exception in the case we are developing a Dynamics CRM plug-in or workflow assembly.
Hence, I decided to briefly describe here steps to debug your code in MSCRM which might be either Sync Plug-In or A Sync Plug-In or Custom Workflow

To debug a Custom Workflow Activity Follow below steps :

  1. Copy the .pdb file for the assembly to the %installdir%(c:)\\server\\bin\\assembly or 
  2. C:\\Program Files\\Microsoft Dynamics CRM\\Server\\bin\\assembly

  3. folder. The assembly can be deployed as on-disk or stored in the database. The recommended deployment is in the database, but for debugging you should choose on-disk. 

  4. Next, attach the debugger to the CrmAsyncService.exe process. 
  5. Make sure that you remove the .pdb & .dll file when you have finished debugging because it uses memory to have it loaded.

To debug a Asynchronous Plug-In Follow below steps :

  1. Firstly Build Plug-in solution
  2. Register it on Plug-in registration tool
  3. Go to Plug-in solution in Visual Studio 2012
  4. Add Debugger at specified location within code.
  5. Attach process from Tools >Attach To Process > CrmAsyncService.exe(both) > OK
  6. Perform action for debugging Plug-in Solution

To debug a Synchronous Plug-In Follow my below post :

Note : 
Make sure that you remove the .pdb and .dll file when you have finished debugging because it uses memory to have it loaded and it will give \”Plug-In assembly could not be loaded\” error while you import Plug-In Solutions from one organisation to other have different Database.
To Import Plug-In solution from Organisation1 to Organisation2(both have different database) make sure all the plugins of Organisation1 must be in Database

Hope it will help someone to debug Plugin & Workflows 🙂


Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

2 thoughts on “How to Debug Custom Workflow Activity and Async Plug-In in MSCRM

  1. Special thanks to ( for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (, if not for him i will never know what has been going on for a long time. Contact him now and thank me later.


Leave a Reply

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

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

Facebook photo

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

Connecting to %s

%d bloggers like this: