Monday, July 31, 2006

VS2005 Debugging Problem, Breakpoints AutoDisabling Themselves

I posted today to microsoft.public.dotnet.languages.csharp about a VS2005 debugging problem that my colleague is experiencing (direct link).

My colleague is having problems debugging in VS2005. When he sets
breakpoints in his code and launches his application via Debug->Start
New Instance, the breakpoints autodisable themselves and the
"breakpoint icon" switches from being filled in to outlined with a
warning glyph on the bottom right hand corner. When moused-over, the
icon reads "The breakpoint will not currently be hit. The specified
module is not being loaded." I checked the loaded modules list via the
Debug->Windows->Modules interface and the specified module was, indeed
loaded, with a pointer to a valid pdb (as far as I can tell).

I even started a brand new Form application from scratch and ran it in
debug mode without adding any new code. I set a breakpoint at the first
line in Program.cs but this too was autodisabled with the same "module
is not being loaded" warning.

I Googled around the newsgroups/web for a while but did not find
anything that directly related.

I should note also that: setting a breakpoint via
System.Diagnostics.Debugger.Breakpoint() works as does Debug->Step Into
new instance.

1 comment:

Anonymous said...

I had this problem today, after much searching discovered that if you have updated the compact framework on the device you get this error.

In my case, I was running CF 2.0 SP1 on my PPC, and had recently upgraded my dev machine to vista, installed the tools but neglected to install CF 2.0 SP1, once I had done this I could debug again!

Hope this helps!

Matt