Plugin debugging


Have you ever stuck in a situation where the plugin working perfectly in a test environment but not the SIT/UAT/Production environment?

Remote debugging might be a tricky setup in most of the production server because of the firewall constraint or even many times developer does not have access to the following environment. In such situation how we can survive, Debugging skills will save us in this situation.

Debugging is must skill for every developer while updating or fixing any code; we need debugging skills. We actually can debug the plugin without connecting to CRM server. We need to capture that particular part and debug it just like you test environment and during debugging this you can modify your code and don’t need to update in MS CRM. These profilers will use your local code from your local computer.  MS CRM 2015 and above environment have this ability.

This method will explain debugging without exception and click this for debugging with exception or with console application

Here are the steps for this…..

  1. First, open your plugin Registration tool
    • Select your plugin
    • Select your step where you want to find the issue
    • Hit ‘Start Profiling’ button ….

Refer below image for same …


  1. It will open profiler setting, select ‘Persist to entity’ option, for first option exception is needed


  1. Then work in MS CRM, and trigger that plugin, it will create the plugin profiler for you in CRM, you will get that in MS CRM >> Settings >> Plugin Profiles


  1. Now, go back to Plugin Registration, and hit ‘Debug’ after selection of your correct step (same one which we created profiler in step 1/2)


  1. Now select profile
  2. sometimes while selecting profiler  there is confution to select correct instance, in such a scenario go to ‘Plugin Profiler’ in CRM and delete all of them and recreate your scenario


  1. Select assembly from your local machine


  1. Now open Visual Studio and attach ‘PluginRegistration.exe’


  1. After this selection, start execution


  1. Now debug just like normal local project ….
  2. For more information please go here.

Enjoy!! J

For more info please refer this link.

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 )

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