w0051977
w0051977

Reputation: 15787

Visual Studio - PDB files

Which .PDB file does Visual Studio use if you use the "attach to process" facility? I followed these steps:

  1. Created a simple VB.NET project
  2. Opened the source code in Visual Studio and clicked build
  3. Double clicked on the .EXE in the 'Debug' folder
  4. Attached Visual Studio to the process that was running
  5. I was then able to add breakpoints and step through the code as expected

I then deleted all the .PDB files I could find i.e. in DEBUG, RELEASE and OBJ, yet I was still able to debug. Where does Visual Studio look for .PDB files?

Upvotes: 0

Views: 1582

Answers (1)

Jeremy Thompson
Jeremy Thompson

Reputation: 65534

When you view the Modules window during Debugging - in c# keyboard layout the command is:

Ctrl + D , M

I created a simple WinForm app, compiled, then I ran the exe in the debug bin and attached a debugger to it and clicked a button to halt the code control on a breakpoint, as shown below.

Then in Visual Studio I pressed the Module window shortcut keys and it tells me where the PDB files have been loaded form:

enter image description here

Upvotes: 1

Related Questions