views:

1745

answers:

3

if i add Breakpoint in a vc++ 6.0 project ,if i start debugging ,then it display error message

"One or more breakpoints cannot be set and have been disabled , Execution will stop at the beginning of the program"

and it shows disassembly window. so what kind of problem it is

plz any body help me how can i add breakpoint and start the debugging.

A: 

The first two things to check are:

  • Have you compiled your C++ code with the correct debug information settings?
  • Have you also told the linker to generate debugging information?

Both of these tend to be turned off when you're building a binary in the release configuration. IME, the most common reason for the above error is that someone forgot to tell the linker to emit debug information...

I've also seen this problem when a binary with corrupt debug information was linked to an executable and rendered the debug information unusable.

Timo Geusch
A: 

This problem occurs mainly when you have set break points in the source files other than the one from which you are starting the debugging.

Suppose you have started debugging the workspace MainModule.dsw and from this opened visual studio editor itself you have inserted breakpoints in the other cpp files, then at the very beginning of debugging you will get this error.

Instead of assembly code your editor shall show winmain method or dllmain method if you have set your source code path to vc folder of Visual studio installaiton. Then you can understand that the main logic behind the error message.

coolcake