Which .PDB file does Visual Studio use if you use the “attach to process” facility? I followed these steps:
- Created a simple VB.NET project
- Opened the source code in Visual Studio and clicked build
- Double clicked on the .EXE in the ‘Debug’ folder
- Attached Visual Studio to the process that was running
- 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?
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: