There I was, debugging an application using VS2008 and stepping through the code, and suddenly, when I press the F11 key to step into a method in another class, up pops this dialog box saying something like "No source available for the current location." Options are to show disassembly (wow, that would help) and I think not to show disassembly. Meanwhile, despite any breakpoints in the method I'm trying to debug -- that's logical, because if there's no source, then how can it breakpoint? -- it runs to completion and execution resumes at the next breakpoint in the code that I can see.
This is most perplexing, because the source code most emphatically exists -- I can see it -- and restarting VS2008 doesn't help, rebooting the machine doesn't help, and when I load another project and attempt to F11 into code in that one, it works just fine.
This last gives me a clue. I'm not much for delving into the operating details of Visual Studio, but it seems to be that if I can step into code everywhere else except this one class, maybe there's something going on with the class, and not VS or the machine. I then have this flash of insight: maybe it's the .PDB file for the assembly that is toast. How to fix this, if true... hmmm. I could edit it and force a recompile (I'm going to edit it anyway as soon as I can figure out why it isn't working right), but perhaps a similar problem might have occurred in some other assembly. So the best thing to do under the circumstances is to force a rebuild of the entire Solution.
I click on Build -> Rebuild Solution, and it goes through everything. Now I try the debugging with the F11 Step-into, and BINGO! It works. Great, 'cuz I was beginning to get worried that I was going to have to use up some precious project time debugging Visual Studio!! Thank goodness I am now back on track. I'll be finished today, if all goes well, and ready to deliver to QA for testing! Geek Speak
2/12/2010 6:50:01 PM UTC
|
|