views:

96

answers:

3

OK, I realize that the PDB files are the symbol files for .NET assemblies. But I never really looked into their extended usage.

If I hook in with a remote debugger from a visual studio that has the running code loaded, do I actually need the PDB files on the remote machine?

Will I get unhandled exception information without them on the machine where the code is running without the PDB files and a debugger with the source code connected?

What else do they do?

+2  A: 

I don't recall offhand if the PDB is required on the remote machine in a remote debugging situation, but among other things PDBs contain the source code line number to compiled code offset map. You can't step through source code using just the managed assembly alone.

Since managed assemblies do retain a lot of text symbol names from the original source code, you can poke around in a managed executable with a debugger without the PDB, but you'll only be able to see type names and public symbols - you will not see names for local symbols, because those aren't needed to bind to the .NET assembly or JIT the IL to native code at runtime.

Unhandled exception notifications are not related to whether a PDB is present or not. If a debugger is attached to the process, remote or not, the debugger will get first crack at the exception.

dthorpe
+3  A: 

The classic resource is on John Robbins' blog.

Stephen Cleary
Very useful! Thanks!
Matt
+1  A: 

The pdb is not needed on the remote machine. The debugger itself has to be able to find it, not the remote agent piece.

Rob Walker