Remote Debugging using Visual Studio 2003

I got into one of those situations when I need to debug a bit of software of a server but I couldn’t install Visual Studio. So for the first time I stepped into the world of remote debugging. It was actually fairly painless, although I did cheat and went the not-recommend route of adding, ahem, myself to the local administrators group.
The basic steps are…
  1. Install remote components (not full blown Visual Studio), found in the install root of VS. A bit annoying you have to install anything but the client was ok with this
  2. Add your interactive user into the remote servers "debug users" group (and possibly the administrators account or discover the permission necessary to access a running process)
  3. On the remote server run; msvcmon -tcpip -anyuser Note that you can specify the correct user but if you’re not too concerned about security then this is a simple short-cut. Also read what it says, it will stop listening after a period of time (15 mins by default) 
  4. In Visual Studio open the process dialog and type in the name of the server
  5. Attach to the process and off you go

Apparently you can start the remote process off from Visual Studio too, but for some reason it wouldn’t let me specify the location. Since I was using Remote Desktop to control the program on the server it wasn’t a problem.

Advertisements
This entry was posted in Debugging. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s