Friday, April 24, 2009

Visual Studio Remote Debugging Setup

Setting up remote debugging on our UAT environment turned out to be pretty straight forward after a false start.

The steps I followed were from here

In summary they were:

* Copy over msvsmon.exe fromMicrosoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 on the development machine to the UAT box
* Ensure that you have a local account with the same name on both machines - we used the local administrator account which is created as a matter of course on all machines. (Note: I tried to avoid having to do this step by setting msvsmon to run in "No Authentication" mode but, although I could attach to processes, symbols were not loading from pdbs making debugging impossible - this is a known limitation when using No Authentication)
* Use "Run As" option to run VisualStudio as the local administrator account
* Use the qualifier field in Attach To Process dialog in Visual Studio to point at the remote machine. I needed to select only Native and Managed code types as T-SQL was reporting an error.
* It then just works - and very well too

1 comment:

  1. Following these instructions some time later I noticed that although the Qualifier value seems to be remembered selecting it gives the following error:
    "Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'Administrator@UAT06-VM'. The debugger cannot connect to the remote computer. This may be because the remote computer does not exist or a firewall may be preventing communication to the remote computer. Please see Help for assistance."
    I seemed to have to enter the machine name or IP address each time.

    ReplyDelete