Visual Studio and Remote Debugging: The easy way

If you find yourself like me struggling with remote debugging using visual studio: here is a stupid easy way to get things running: READ THE FREAKIN' DIALOG MESSAGES!

So, here is the recipe:

  • Download a copy of the Remote-Debugger from Microsoft (I got mine over here: )
  • Install it on the target machine
  • Don't bother yourself with setting it up as a service, we'll be running the remote debugging application manually.
  • Make sure the the username and password of your remote machine and the local machine are the same. Otherwise you might run into authentication problems when connecting to the remote host. Easiest way to achive that is being a part of a NT Domain and using the same account on both machines.
  • Now, listen very closely: Remote debugging needs the debug symbols to be available to the remote machine. Here is a rather stupid but dead simple way to get this working: In visual studio head over to Tools->Options->Debugging->Symbols and set it to C:\temp
  • Deploy your "to be debugged application" onto the remote host into C:\temp - include those funny .pdb files. Those are the debug symbols we'll need.
  • See a pattern here? If not re-read the last 2 list items
  • run the app on the remote host
  • Debug-> Attach Process: Enter the hostname of the remote machine (labeled Qualifier), select managed code from "Attach to:", hit refresh and pick your process.
  • Done.

And yes, I am pissed, mostly at myself because I did not pay attention to the debug symbols and was wondering why I could attach to a process but not set any breakpoints. Still a spoiled java coder I guess. No such headaches over there.