Page 1 of 1

Loading DLL symbols (PDB) in Visual Studio

PostPosted: May 3, 2010 @ 1:21am
by Dan East
I have an application which loads a couple of my own DLLs. I needed to debug both the application and the DLLs on an actual Windows Mobile device. The older eVC++ would prompt for the location of the PDB (Program DataBase) files for the DLLs when debugging started, and once I specified the location eVC++ would remember it for future debugging sessions.

Visual Studio 2005 does not seem to prompt for any PDB files, so they must be specified manually. This is a simple process, however the command to do this is a bit hard to find. So here are steps on how to manually locate PDB files for DLLs you wish to debug.

1) You must be using the debug version of the DLL you wish to debug, and you must have a matching .PDB that was generated during the build process.
2) Begin debugging the application.
3) Select the menu command Debug->Windows->Modules (you can also press CTRL+ALT+U
4) Find the desired DLL in the Modules panel.
5) Right-Click and select Load Symbols
6) Navigate to the PDB on your local machine. As soon as I entered the directory containing the PDB it selected it automatically, and the Symbol Status of the DLL changed to "Symbols Loaded".

Note that the Debug->Windows->Module command does not appear unless you are actively debugging, which is what made it hard for me to find. I was trying to configure the PDBs before I began debugging, which does not appear to be possible.