{"id":2469,"date":"2016-10-28T17:13:06","date_gmt":"2016-10-28T17:13:06","guid":{"rendered":"http:\/\/himbap.com\/blog\/?p=2469"},"modified":"2016-10-28T17:13:06","modified_gmt":"2016-10-28T17:13:06","slug":"5-quick-steps-to-debug-your-crm-online-plugin","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=2469","title":{"rendered":"5 Quick Steps to debug your CRM Online Plugin"},"content":{"rendered":"<p>In this article we going to provide you quick 5 steps that you can use to debug your CRM online plugin. Let say we are working with CRM online plugin and getting some error in our plugin, now we want to troubleshoot our plug-in by debugging it.<br \/>\nBefore jumping into steps, here is what we are assuming:<\/p>\n<ul>\n<li>You are connected to your CRM Online organization.<\/li>\n<li>You have experience in plugin development.<\/li>\n<li>You have downloaded latest CRM SDK and connected to plugin registration tool (you can find this tool under SDK\\Tools\\ location).<\/li>\n<li>You have already registered plugin and getting error in your plugin which you want to debug.<\/li>\n<li>Your plugin code is open in visual studio.<\/li>\n<\/ul>\n<p>Now let\u2019s use following steps to debug our plugin:<\/p>\n<p><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/one.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2476\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/one.png\" alt=\"one\" width=\"87\" height=\"79\" \/><\/a>\u00a0Install Profiler to your CRM organization using Install Profiler button under plugin registration tool.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/profiler.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2479 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/profiler-300x228.png\" alt=\"profiler\" width=\"300\" height=\"228\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/profiler-300x228.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/profiler.png 370w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nMake sure you are getting installation completion prompt.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/two.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2474\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/two.png\" alt=\"two\" width=\"85\" height=\"79\" \/><\/a>\u00a0Select your plugin step and click on Start Profiling button, you don\u2019t need to do any changes on profiler setting dialog so simply click on Ok.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/startprofiling.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2477 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/startprofiling-300x169.png\" alt=\"startprofiling\" width=\"300\" height=\"169\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/startprofiling-300x169.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/startprofiling.png 489w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/three.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2472\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/three.png\" alt=\"three\" width=\"85\" height=\"79\" \/><\/a>\u00a0Execute your plugin event, for example we have plugin on account create so when will try to create account we will get business process error like following. Download the error file and store it under SDK\\Tools\\PluginRegistration location. Also copy your plugin dll and pdb file to same location.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginerror.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2480 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginerror-300x142.png\" alt=\"pluginerror\" width=\"300\" height=\"142\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginerror-300x142.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginerror.png 551w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/four.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2475\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/four.png\" alt=\"four\" width=\"85\" height=\"79\" \/><\/a>\u00a0Go to visual studio and attach to PluginRegistration.exe process using Attach to Process option under Debug menu.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/attachprocess.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2471 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/attachprocess-300x60.png\" alt=\"attachprocess\" width=\"300\" height=\"60\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/attachprocess-300x60.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/attachprocess-624x125.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/attachprocess.png 769w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/five.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2473\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/five.png\" alt=\"five\" width=\"85\" height=\"79\" \/><\/a>\u00a0Finally navigate to plugin registration tool,\u00a0click on Debug and select location of the error file and your plugin assembly.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/debug.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2470 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/debug-300x222.png\" alt=\"debug\" width=\"300\" height=\"222\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/debug-300x222.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/debug.png 528w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>As soon as we will click on Start Execution button, it should take us to breakpoint in visual studio\u00a0like following:<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginsource.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2478 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginsource-300x116.png\" alt=\"pluginsource\" width=\"300\" height=\"116\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginsource-300x116.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginsource-624x241.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2016\/10\/pluginsource.png 970w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we going to provide you quick 5 steps that you can use to debug your CRM online plugin. Let say we are working with CRM online plugin and getting some error in our plugin, now we want to troubleshoot our plug-in by debugging it. Before jumping into steps, here is what we are assuming: You are connected&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=2469\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2486,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,275],"tags":[398,395,396,397],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2469"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2469"}],"version-history":[{"count":7,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2469\/revisions"}],"predecessor-version":[{"id":2488,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2469\/revisions\/2488"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/2486"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}