- Build and register your Plugin as usual.
- Inside Plugin Registration Tool, you’ll find a button which says Install Profiler, Click it.
- Once it is done, you will find an entry for Plug-in Profiler beneath your assemblies.
- Now, go-to the step for which you want to debug your plugin and press the Profile button.
- Once done, you will see a tag (Profiled) adjacent to the step.
- Now go ahead and execute the plugin i.e. perform the steps in CRM that will trigger this plugin.
- If the code has any errors, then CRM will provide you a log file to download; go ahead and download the file. (see screenshot below)
- Now, inside Visual Studio, insert Breakpoints wherever you feel and use Attach to Process button and attach the code to Plugin Registration Tool exe.
Note: Initially you will see that VS cannot find symbols so breakpoints will not be hit. - Now, go back to Plugin Registration Tool and Select the Step which you profiled earlier hit Debug button.
- A new Dialog-box will be presented to you, refer to the necessary files and hit Start Plug-in Execution button.
- Wait for a few seconds and you will start to see the following in Plug-in Traces window from Debug screen.
- Now, switch to Visual Studio and you will see that your first Breakpoint has been hit.Copied From :- http://crm.ipiyush.me/debug-plugin-in-dynamics-crm-2011/
Tuesday, September 4, 2012
Debugging a Plugin in CRM 2011
Subscribe to:
Post Comments (Atom)
i get an excption when i select the error log file:
ReplyDeleteUnhandled Exception: System.ArgumentException: Unable to parse the OrganizationServiceFault.
Parameter name: serializedReport
at PluginProfiler.Library.ProfilerUtility.ExtractReport(String serializedReport)
at PluginProfiler.Library.ProfilerUtility.DeserializeProfilerReport(String assemblyFilePath, String logFilePath)
at PluginProfiler.Library.ProfilerExecutionUtility.RetrieveReport(String logFilePath)
at Microsoft.Crm.Tools.PluginRegistration.OrganizationHelper.ParseReportOrShowError(IWin32Window owner, FileBrowserControl profilePathControl, Boolean requireReportParse, ProfilerPluginReport& report)
Inner Exception: System.InvalidOperationException: Message does not contain a serialized value.
at PluginProfiler.Library.ProfilerUtility.ExtractReportFromFault(OrganizationServiceFault fault)
at PluginProfiler.Library.ProfilerUtility.ExtractReport(String serializedReport).
i hope you can help me .
Great Post!!
ReplyDeleteFor more : CRM Software || CRM Software in Mumbai