Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the pdb files actually do?

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?

like image 978
Matt Avatar asked Jul 16 '10 20:07

Matt


2 Answers

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.

like image 180
dthorpe Avatar answered Sep 29 '22 19:09

dthorpe


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

like image 22
Rob Walker Avatar answered Sep 29 '22 19:09

Rob Walker