Hi Experts,
I have more confusions in debugging a plugin in crm. First, what are all the methods to debug a plugin and how? second, which one is preferred one and why? Third, If i dont have any errors but still i want to debug my plugin. How to acheive this?
Also, whenever i try to debug my error(txt file) through plugin registration tool, i am always getting errors when i click start execution.
Thanks
*This post is locked for comments
Yes. Also along with the steps above, the plugin solution should be built and debugged under debug mode. Make sure the VS solution is not in Release mode.
Hi Alagu Nellaikumar,
How we do to realtime way for plugin debugging. I'm using CRM 365 online & visual studio 2012
I couldn't find the below process in my visual studio
a)In visual studio code, click debug->attach to process
Asynchronous plugin
Attach crmAsynch service
Attach Microsoft sandbox service
Attach w3wp service
Synchronous Plugin
Attach Microsoft sandbox service
Attach w3wp service
Regards
Dhan
Hi,
please refer the link below. Hope it will helps
Hi
Your plugin code not in that assembly.
Thanks meenoo. Thanks alagunellaikumar. Here is my complete action when i tried to debug my code.
As you said i selected my plugin step and started profiling. Then i did the action in crm which i want to debug. since i have no error i dont receive any log file to download. Then in registration tool, i started the debug process. I received a file in profile when i click the down arrow in the wizard and also uploaded my dll. Next, in visual studio i attached the process 'plugin registration tool'.
Then In the wizard I clicked 'start Execution'.
Here i am getting the error(popup window) which i specified earlier in this thread
Unhandled Exception: System.InvalidOperationException: The plug-in type "MyPlugin" does not exist in the specified assembly.
Hi Abirami,
There are two ways.
a)Plugin registration tool
b)Real time-
Plugin registration tool:
a)Start profiling your plugin
b)Work do your action in CRM
c)Now exception throws download error log
d)Click debug the plugin registration tool, upload your dll and error log file
e)Click start execution
Real Time:
a)In visual studio code, click debug->attach to process
Asynchronous plugin
Attach crmAsynch service
Attach Microsoft sandbox service
Attach w3wp service
Synchronous Plugin
Attach Microsoft sandbox service
Attach w3wp service
b)Work do your action in CRM
C)Now you can debug your program
Hi Abi Rami,
I know you might have tried some of these steps already, but give it a shot through these steps.
1. First, in the plugin registration tool, select the plugin step and you will see 'start profiling' button. Click on it.
2. While it is profiling, perform the action that you want to debug. You will receive a profile file which you need to download and save it somewhere.
3. Stop profiling.
4. In visual studio, build your plugin.
5. In plugin registration tool, hit 'debug', you will see a wizard where in you need to select the profile you downloaded and the assembly that you built in the 4th step and keep it aside(do not close).
6. In Visual studio, you need to place a breakpoint wherever you want and then click 'Debug' in the menu options.
7. Select 'Attach to Process' and select 'Plugin registration tool' in the available processes section.
click ok.
8. In the wizard(Replay Plug-in Execution) which you did in 5th step, hit 'Start Execution'.
Your breakpoint in the plugin will be hit for you to debug.
Try these steps and I am sure it will work.
Thank you.
Could you please provide step-by-step screenshots of your actions otherwise I don't see a way how to help you.
Yes, I did everything. I am getting Profiles now. But when i hit start execution i am getting the error
Unhandled Exception: System.InvalidOperationException: The plug-in type "MyPlugin" does not exist in the specified assembly.
It doesn't matter if you have errors or not. Answer following questions please:
1. Have you installed Plugin Profiler using Plugin Registration Tool?
2. Have you enabled profiling of step you want to troubleshoot choosing "Persist to entity" option?
3. Have you initiated action that causes triggerring of a plugin to record profile?
4. Have you tried to click "Down Arrow" button to check available profiles with possibility to choose one of available?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,232 Super User 2024 Season 2
Martin Dráb 230,064 Most Valuable Professional
nmaenpaa 101,156