I\'m getting the error in the subject line. I\'m running vs2k8 on server 2k3sp2. I\'ve tried deleting the pdbs, cache directories, verifying that debugging is set up on the
I usually see this error pop up when I am working with two separate web 'sites'. I have a web front end and a web service back end. If the development server isn't running for the 'site' the code file is for, then you will receive that error message.
This may not be your problem exactly, however this is usually the situation when I see that error message. Another thing you can do is Debug -> Attach to Process if the debugger isn't attached to the correct process.
If you have a "WebSite" project, rather than "WebApplication", I've found that overlapping code file classes can cause the issue. There are a few ways this can happen. Unfortunately Visual Studio still seems to compile the solution/project without error.
To resolve the issue I
Hope that helps.
Place an inline break statement to be sure you are actually running the code. If you do not stop then it is likely the code you are attempting to debug is just not being run, or you are not debugging it with a managed debugger.
If you do stop but cannot find source, then you likely do not have a pdb for the module. Check the top of the callstack window to see which assembly contains the method you stopped in. That is the assembly for which you need a pdb. The module window will show the location on disk of that assembly. The command line tool "dumpbin -headers assembly.dll" will dump the PE headers. Check the Debug Directory to see where the pdb was placed when the assembly was built. If the Debug Directory does not exist then the assembly was built without debug information. If that is the case your problem is then to determine why that specific assembly was built without debug info. If it did have debug information and a pdb exists, but is not being loaded then it means either the pdb wasn't found by the debugger and you should look at the tools\options\debug\symbol settings. Or the pdb and assembly do not match. If the timestamps are not within 1 sec then they certainly don't match.
If the above doesn't help please update with more information.
Usually this happens when the .pdb files that VS is using for debugging are different than what the code is actually executing. That is, if you have made changes to your assembly.
Also, make sure that you have <compilation debug="true">
in the web.config. I don't know if it has any bearing on the page directive, but that's usually what does it for me :)
I agree that I have seen this when I have multiple assemblies that are out of sync and/or one or more pdbs do not match the source. In my case, it was because I had a weirdness with my version control software (ClearCase) and I was not actually compiling what I thought I was.
The only time I've ever run into an issue like this is if I was trying to debug while the project was in release mode.