Let us take a simple plugin to understand the debugging process. We need the profile which we will use for debugging.
Register the plugin (debug version) and corresponding step using plugin registration tool.
Select Install Profiler in Plugin Registration tool and wait till the installation is complete.
Select the Step in Plugin and Click Profile in the tool
Select Ok in the dialog box
Open CRM and perform the step that will run the plugin.
Download the log file.
Open Visual Studio and attach debugger to PluginRegistrationTool.exe
Go back to Plugin Registration tool, select the step and select Debug from the tool bar.
Specfiy the log file in the Profile location and plugin assembly that is in debug folder.
Click on Start Execution to start debugging
Hope it helps.
12 thoughts on “Debugging online plugin in CRM 2013.”
good one, thanks for sharing
Can you please share the correct way to Debug using Persist to Entity Option. I am trying to register a plugin on Create of activitymimeattachment but unable to get the business process error(using Exception – Option 1). I also tried with Option 2(Persist to Entity) but not getting the error log in Replay Plugin Execution, might be I am missing something . I appreciate your help in advance.
if i don’t have any error in plugin i.e i want to remotely debug production environment , and i don’t write any throw Invalidexception statement , how can i debug in that case ? also what happens in persist to entitty scenario and replay plugin execution ?