8/24/2010

Visual Studio Remote Debugging Pitfalls

Setting up remote debugging with Visual Studio is fairly easy and ever so useful. This article describes the basic setup: http://www.cprogramming.com/tutorial/visual_studio_remote_debugging.html

I have walked into two traps that I would like to mention. May it help someone else:

  • the PDB file needs to be deployed with the application – if you use a setup project, just add the debugging information to it. If you forget this, the debugger will complain about not being to load the symbols, even though it has them locally!
  • the machine, which you run the Debugging Monitor on, needs to run the NetBIOS protocol; if it does not you will be able to connect without authentication only. In order to enable NetBIOS, just install the Windows File and Printer Sharing service through the properties of the network connection.

And this is probably obvious, but I’ll mention it anyway: the builds of the software on your machine (where the debugger runs) and the machine to be debugged (where the Debugging Monitor runs), need to be exactly the same. If you have several builds out in the field, make sure to keep full copies (source, EXE, and PDB )of all builds that you plan to debug.

And one last hint: don’t use “No authentication”: not only is it unsecure, it also will not let you debug managed code, which is probably what you need to do.

Good luck finding that bug!

No comments:

adaxas Web Directory