Thursday, March 1, 2012

MS CRM Debugging Custom Workflow code

Follow the steps to succesfully start debugging of your custom workflow 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  MicrosoftCRMAsynchronous service and try.
2. Register the workflow to Disk instead of Database using PluginRegister tool
3. After sucessfully placing those files, Reset MicrosoftCRMAsynchronous service from windows services
4. 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

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

No comments:

Post a Comment