Sunday, June 14, 2015

How to debug Dynamics CRM Online Plugin

The following are the steps to debug CRM Online plugin which are as follows:
Step 1: Open the Plugin Registration Tool.
Step 2: Create a connection and connect to the server.
Step 3: After successful connection, click on the Install Profiler (see Fig. 1).
Image
 Fig. 1
Step 4: Register the Plugin Assembly and also the new Step.
Step 5: Now copy the debug complied plugin assembly (e.g. PSMAutoNumbering.pdb) on your computer drive location where you have your plugin registration tool.
Step 6: Select the plugin step and click on the Profile (see Fig. 2).
Image
Fig. 2
Step 7: Perform the operation in CRM Online that cause plugin to run (see Fig. 3). Here I am adding a new record on my custom entity called Project.
Image
Fig. 3
Step 8: Download the log file generated after clicking on the Save button and save it on your system (see Fig. 4).
 Image
Fig. 4
Step 9: Open the solution in Visual Studio and attach the process called “PluginRegistration.exe” (see Fig. 5).
Image
Fig. 5
Step 10: Now come to Plugin Registration Tool, select the plugin step and click on the Debug (see Fig. 6).
Image
Fig. 6
Step 11: After clicking on the Debug, dialog box will come up and specify the above downloaded log file and plugin assembly and click on the Start Plug-in Execution (see Fig. 7).
Image
Fig. 7
Step 12: Now you are all set to debug your plugin code (see Fig. 8).
Image
Fig. 8

No comments:

Post a Comment

How to Deploy your API as a web app or API app

  Before you can call your custom API from a logic app workflow, deploy your API as a web app or API app to Azure App Service. To make your ...