Thursday, March 8, 2012

MS CRM Debugging Custom Plugin Code


Follow the steps to succesfully start debugging of your custom plugin code in MSCRM.

1. Place the DLL and PDB files in the CRM installed path. By default, it points to following path C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly
If you are unable to paste the files, then reset the IIS and CRMAsyncService and try.
2. Register the workflow to Disk instead of Database using PluginRegister tool
3. After sucessfully placing those files, open the code on the server using Visual Studio and put a break point and press Ctrl+Alt+P that opens 'Attach to process' window.
Check these 2 fields
      1. Show processes from all users
      2. Show processes in all sessions

4. Now, select w3wp.exe and click on Attach. If you are trying to debug a workflow, then attach it to
    CrmAsynService.exe
5. Open the crm window and run the functionality that triggers the custom plugin and see the debugger works for you.
6. Reset IIS if you are unable to debug and try again.

No comments:

Post a Comment