Reputation: 322
I just started using the included Development Kit that came with the CRM SDK. I created a simple plugin using the Development Kit and now I cannot find a way to debug the plugin. Before i started to use the Development Kit i was able to debug the plugins i created. I attached the debugger to the w3wp.exe process but the debugger doesnt break on the breakpoint at all. Moreover my assembly is registered on Database and with Isolation set to None Any help would be greatly appreciated. Thank you
Upvotes: 0
Views: 1822
Reputation: 322
I found out what the problem was. Turns out you have to re-deploy the plugin after setting the Assembly with Isolation set to None. Then like Chris Snyder said you still have to copy the PDB file from the debug folder to the bin/assembly folder on the CRM server. Seems like that step is still manual. Will see if I can either find a way to do it automatically or just create a simble batch file to do it. Thank you all for your help.
Upvotes: 0
Reputation: 968
There is another way to debug (instructions toward the end), by copying the PDB to the CRM /bin and attaching to the asynchronous (or sandbox) worker process. I'm not sure which way is easier...I will have to try Piyush's way sometime, but I do not use the RegistrationTool anymore thanks to the toolkit:
Debugging works well once you follow the setup instructions, though copying the PDB file remains a manual step. Also note, the sandbox process (Microsoft.Crm.Sandbox.WorkerProcess) is not started until after a plug-in is run, so you will have to invoke it (or another one) at least once before you will be able to debug.
Upvotes: 3
Reputation: 886
Some time back I wrote an Article to debug plugins in CRM 2011, this might help you out.
Debug Plugins - CRM Parking Lot
Upvotes: 1