I am trying to debug a web app, and am having some rather odd issues with VS. First thing I do is attach to the w3wp process and set break points in code that DOES execute. The thing is, none of the break points are hit. Thinking that I must have done something wrong, I stopped the debugger and when I went to reattach, only 6 of my 54 processes are shown and none of them are w3wp (and yes I have both show processes from all users and show processes from all sessions check). Restarting VS (or the computer) does nothing. Any one have any ideas on how to get VS to work?
A:
While attached to the process,
- Click the Debug menu
- Windows -> Modules
- Alternately "Ctrl-D, M"
This will show you all the dlls that are loaded by the process you have attached to. If the dlls that you require are not there, refresh the page in your browser and see if they are added to the list.
If they are not in the list
You attached to the wrong w3wp.exe process.
If they are in the list
- Look at the "path" column, make sure it is executing from where you expect them to be.
- Look at the "Symbol File" column, if it is empty,
- right click on the dll and select "Load symbols from ->" then "Symbol Path"
- This will allow you to point directly to the local pdb file that you want to load. It should be in the "myproject/bin/debug/" directory.
- This will probably say "the pdb does not match module" (I forget.) If this is the case, it means that the code you are running is not the same as the version you have in visual studio.
- This is very important. If you deploy something to the gac, then build in visual studio, it will consider the pdbs to be out-of-sync with the gac'd dll! So, if you want to debug something that you've placed in the gac, it means that the timestamp on the pdb and the timestamp on the loaded dll must be identical!
Hopefully, that will get it all working again.
thanks, it started working on its own right before your post. I do plan on saving this info though as VS has done this before
0_o
2010-07-29 21:09:05
@0_o Glad to help
2010-07-29 21:11:53