Views:

Creating a sample plugin for example “on updating of account name email address should update”

image

While updating account record, if you get any error dialog from the plugin we need to check where we have issue in the code but it will be very difficult if the logic in the plugin is complex. So in quick way to find the issue we can debug the plugin in few steps.

image

To debug the plugin follow the below steps:

Go to Plugin Registration tool kit click on the install Profiler as shown below screenshot.

image

Then select the step and click on start profiling as shown below

image

image

Click on ok.

Execute your plugin event here on update the account. You will get this error dialog as shown in below screenshot.

image

Download the error Log file.

Go to Visual Studio –> Add Debugger in the code then à click on debug –> click on Attach to Process.

image

In the Attach to Process dialog select the Plugin Registration Tool and click on Attach.

image

Finally navigate to plugin registration tool, click on Debug and select location of the error file in the profiler and your plugin assembly dll in the Assembly Location.

image

 

image

Then click on the Start Execution.

image

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

image

Hope this blog helpful to debug the Plugin in Dynamics 365