Marco said:
I am trying to debug a C++ program using Visual C++ 6.0. After setting
my breakpoints and starting the debug with F5, I get the error message
"One or more breakpoints cannot be set and have been disabled.
Execution will stop at the beginning of the program."
even though it used to work before. Is there some setting I need to
change, perhaps?
You need to write more programmer tests, to avoid the need to debug, and to
provide a rapid platform when you do.
In this situation, delete your NCB, PDB and PCH files, close all your source
files, restart your editor, rebuild everything, and tap <F11>. Control flow
will drop into main().
You are now looking at the source your debugger thinks compiled to produce
your program. Refreshing all those intermediate files, including the files
the editor thinks should be your source, improves the odds you are looking
at the real thing.
If you put a breakpoint into a templated function (or "method"), between two
debugger runs the compiler might think the breakpoints belong only to one
instance, and it will announce it is disabling other instances.
Your question will get better answers on a newsgroup that covers your
debugger. This newsgroup is only qualified to provide platform-neutral
answers to questions about the C++ language itself.
Read this to learn how to post:
http://www.slack.net/~shiva/welcome.txt
Use this to research your question and the names of newsgroup where it's on
topic:
http://groups.google.com