How to debug a PlugIn in Dynamics 365 Online Using the Plugin Profile

8 Jun 2018 webmaster

In many occasions we want to debug a Custom Activity that it's inside a Workflow or a PlugIn of a Dynamics CRM 365 Online to know if the correct execution parameters are being passed in the context. In our case we debug a PlugIn that fires when creating a resolution of a case.Below we show the steps to follow to make this type of depuración with the code located in our Visual Studio 2015 and the Dynamics CRM Online.

  1. The first necessary thing is to download the SDK 365 and locate the folder SDK \ Tools \ PluginRegistration \ PlugInRegistration tool.
  2. After having opened the tool, connect us to our Dynamics CRM using the user 365 and choosing the organization that we want to map. Once connected, we run Install Profiler.

  3. When the PlugIn Profiler is active, a solution is created in our CRM Solutions,  called PlugIn Profile as shown in the figure below:

  4. Also in the PlugIn Registration Tools a new entry appears at the bottom with the PlugIn Profiler activated. As it is about preparing the debugging of a PlugIn, we have to mark the step that we will have to debug within the PlugIn and click on the top Start Profiling.

  5. We mark in Profile Settings to enter the PlugIn Data that we want to debug
    Below are the options:
    Exception (Recommended): This has to be marked since it is recommended.
    Persist To Entity: Not necessary.
    Include Secure Configuration: You have to mark it.

  6. Once the previous step is done, we will notice that the step indicated for the debugging of this marked with (profiling).

  7. Now we go to Attach the process of our PlugIn Registration Tools to the Visual Studio having the newly compiled code in screen and putting the interruption points in the necessary lines.

  8. We return the PlugIn Registration Tools, mark the Step that we want to debug within the PlugIn and point to the top Debug. This will bring up a dialog box to show the options needed to debug the PlugIn. These are::

  9. Profile: We attach the log file that we have downloaded
    Assembly Location: The location of the newly compiled PlugIn DLL.
    PlugIn: We mark the step that will come out after selecting the PlugIn DLL to debug.

  10. We press on Start Excecution and Start Execution and we must visualize in our code the detection of the execution in the line of expectation.

Redirect to Facebook Page