From: http://blog.csdn.net/train_z/archive/2008/04/30/2347649.aspx
When you use step info or run to cursor in debug to set a breakpoint, one or morebreakpoints cannot be set and have been disabled. Execution will stopat the beginning of the program will appear.
Solution,
1. go to project-> setting-> C/C ++-General-> debug info-> program Databse for edit and continue; 2. edit-> breakpoints-> removeall; 3. build-> set active project configuration-> *. EXE Win32 debug. after the above three steps, OK!
Another article: 1. Two debugging methods: 1. debug mode: 2. Release mode: Click [project]-> [settings…], In the displayed "Project Settings" dialog box, select the "release" status. In the C/C ++ label, select general, optimizations select disable (Debug), and debug info Select Program database; select the Generate debug info check box in the Link label. Note: The release mode is better, because in some cases, the program can only run in release, for example, the DLL of the displayed dialog box is displayed in debug and then the window is dead. Ii. Possible errors during debugging: "cannot be debugged" and "breakpoint errors ". 1. "cannot be debugged": "One or more breakpoints cannot be set and have been disabled. execution will stop at the beginning of the program. "2." breakpoint error ":" One or more breakpoints are not positioned on valid lines. these breakpoints have been moved to the next valid line. "NOTE:" resumable debugging "is not the same as" resumable errors "." resumable errors "Disable certain error breakpoints, but" cannot debug "Disable all breakpoints. 3. solution 1. For "breakpoint errors", VC will automatically help us locate a line, so we don't need to worry about it! 2. For "debugging unavailable", the solution steps are as follows: 1) restart the computer 2) copy the project to a new directory and delete the NCB,. Opt,. PLG files. Note that it is a copy, not a cut. 3) in the menu bar (menu): Build-> rebuild all.