Five Quick Steps To Debug Your CRM Online Plugin

In this article we going to provide you five quick steps that you can use to debug your CRM online plugin. Let's say we are working with CRM online plugins and getting some error in our plugin, now we want to troubleshoot our plug-in by debugging it.

Before jumping into steps, here is what we are assuming.

  • You are connected to your CRM Online organization.
  • You have experience in plugin development.
  • You have downloaded the latest CRM SDK and connected to a plugin registration tool (you can find this tool under SDK\Tools\ location).
  • You have already registered a plugin and are getting an error in your plugin which you want to debug.
  • Your plugin code is open in Visual Studio.

Now let’s use the following steps to debug our plugin.

 

Install Profiler to your CRM organization using Install Profiler button under plugin registration tool.

 

Make sure you are getting installation completion prompt.



Select your plugin step and click on Start Profiling button, you don’t need to do any changes on profiler setting dialog so simply click on Ok.

 

 

Execute your plugin event, for example, we have plugin on account creation so when we will try to create an account we will get a business process error like the following. Download the error file and store it under SDK\Tools\PluginRegistration location. Also copy your plugin dll and pdb file to same location.

 

 

Go to Visual Studio and attach to PluginRegistration.exe process using Attach to Process option under Debug menu.
 



Finally navigate to plugin registration tool, click on Debug and select location of the error file and your plugin assembly

 
As soon as we will click on Start Execution button, it should take us to breakpoint in visual studio like the following.

 

Up Next
    Ebook Download
    View all
    Learn
    View all