Remote Debugging & CRM
May the gods of CRM and Best Practices forgive me; for I am debugging in my live CRM environment. *begins to flagellate* (look up the meaning before you laugh)
At least now I can remotely debug, putting my custom CRM development in the CRM’s application pool and giving me access to the user identity and other session variables. It’s taken me roughly 3 days so in total my project is 9 days behind!
So with my sins forgiven and my anguish dulled, here’s how you setup remote debugging. My client machine (the machine I’m developing on) is running Windows XP with Service Pack 2 and the server is running Windows 2003. Lastly, I’m developing using Visual Studios 2003.
Setting up Remote Debugging on the server
Insert the Visual Studio .NET 2003 Disc 1
- Don’t bother with clicking on Remote Components Setup; the links are a bit buggy.
- Instead explore the CD and find RemoteComponents.htm
- You need to install Visual Studio Analyser Server and Full Remote Debugging. Search the html document and you’ll find the paths to run. They look something like this:
- msiexec /qb+ /i d:\vs_setup.msi NOVSUI=1 TRANSFORMS="d:\Setup\Rmt9x.mst" SERVER_SETUP=1 ADDLOCAL=Visual_Studio_Analyzer_Server11
- msiexec /qb+ /i d:\vs_setup.msi NOVSUI=1 TRANSFORMS="d:\Setup\Rmt9x.mst" SERVER_SETUP=1 ADDLOCAL=Full_Remote_Debugging
- On the Start menu, choose Run. Type the first path in and run it. Then run the second.
Congratulations you’ve setup Remote Debugging on the server. Now we move on to the more important task of setting up the client machine.
Setting up Access for Remote Debugging on the client
- Download debuggerfirewallconfiguration.exe from Microsoft and run it. This sets up the Windows XP firewall to allow the remote debugging protocols through.
- On the Start menu, choose Run. Type DCOMCNFG
- Expand Component Services. Expand Computes. Right-click on My Computer, choose Properties.
- Click on the COM Security Tab. Click on Edit Limits in the Access Permissions frame. Select ANONYMOUS LOGON and tick Allow for Remote Access.
- Restart the machine. You have to do this, I’m sure you could restart a service, but I’m not sure which one.
Again Congratulations, you are now ready to begin remote debugging. Open Visual Studio and create a new ASP.NET Web Application. In the location make sure to change the hostname to the server name. For example
http://crm/WebApplication1
Side Note: I couldn’t figure out how to provide a username and password when setting up the website, I’m assuming that it uses the user that you are logged in with on the client machine. Combine this with CRM using Windows Integration security and your client machine HAS to be on the same domain as the server. So my attempt to setup a stand-alone test server and have my client still on the network falls flat on its face.
Happy debugging!