The breakpoint will not currently be hit

T

TC

When I try to debug my code, Visual Studio is skipping my breakpoints.

At runtime, the solid red circle becomes only the outline of a circle,
and if I hover over the breakpoint I see the message "The breakpoint
will not currently be hit. No symbols have been loaded for this
document."

Breakpoints seem to be functional in the startup project, but nowhere
else. I've found that I can hit a breakpoint in the startup project,
then step into the code where breakpoints aren't functional and debug
normally.

As a test, I created a completely new project and put a breakpoint
there. That breakpoint is skipped.

All my projects are configured for Debug. I've cleaned and completely
rebuilt all projects, yet I still experience this problem.

Needless to say, this is very frustrating. Can anyone suggest a
solution?


-TC
 
D

Dick Grier

Make sure you are not running in Release mode. Breakpoints work only in
Debug mode (for obvious reasons).

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
T

TC

Dick,

Thanks for the suggestion, but all my projects are configured for
Debug. That isn't the problem.

-TC
 
D

Dick Grier

BTW, I see that you said that the project is in Debug mode... However, I
have to suggest that you double-check that the Advanced Compiler Options
Generate Debug info drop down is not set to "None."

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
T

TC

Dick,

Thanks for another good suggestion. I didn't know about that setting,
but I just checked it and found that it is set to "Full".

I just shut down and restarted Visual Studio. Now, VS is hitting the
breakpoints.

I wasn't very careful with my observations, and I'm not sure if it was
the clean & rebuild which fixed the problem, or whether it was
restarting Visual Studio which did it.

If anyone else experiences this problem, I recommend that you follow
Dick Grier's suggestions -- make sure you are in Debug mode and that
the Generate Debug option is not "None" -- and if they don't work, try
cleaning & rebuilding the solution, then restarting Visual Studio. It
worked for me.


-TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top