Tuesday, February 22, 2011

Remote Degugging in CRM 2011

It was time to find how do I really debug my CRM Plugin or custom workflow without ever going back to my CRM server in cross domain. Here are the steps to do that. Assuming that your client has Visual Studio 2010 with 64-bit:


  • Copy folder c:\program files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x64 from your client to same path in the CRM server


  • In server Run as administrator msvsmon.exe , make sure that msvsmon console shows connected as CRMDOMAIN\crmservice@CRMSERVER


  • In client create local user crmservice with same password as crmservice user in server


  • In client open the plug-in solution in visual studio 2010 build. Copy the dll & pdb files(pdb file if plugin is registered in database) from debug folder to server path C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly folder


  • In VS-2010 click tools? Attach to Process select Transport as Default and Qualifier as CRMDOMAIN\crmservice@


  • Click ‘Show process from all users’ select w3wp.exe process to start debugging
    Attach the debugger to the process on the Microsoft Dynamics CRM server that will run your plug-in. Refer to the following table to identify the process




Here CRMSERVER=Name of CRM Server, CRMDOMAIN = Domain name for CRM Server and crmservice = crm user
I had my firewall disabled in my VPC/VMWare/CRM Server

Happy Debugging :)

-Guru

No comments:

Post a Comment