Q: MFC doesn't like breakpoints?
Having set a breakpoint on an executable line of code. I get the error message listed below when starting to run in debug mode.
Can anyone tell me what's going wrong here?
One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program.
Re: Q: MFC doesn't like breakpoints?
You're in release mode, not debug...
Re: Q: MFC doesn't like breakpoints?
I get this mistakes from time to time as well in debug mode. Normally it happens when I put the breakpoints at places where nothing happens (for example a declaration, a line with only a '{' ...).
If You put it at parts of the code that are never called it can happen as well - in Your case You could check with a TRACE, whether this part is called at all...
Re: Q: MFC doesn't like breakpoints?
I am running in Debug mode. I removed all breakpoints and tried to just run to cursor. The debugger starts up in D:\...\VC\crt\src\CRT0.src in the WinMainCRTStartup function. I can never step to the point where the cursor is in MY code. Any suggestions?
Re: Q: MFC doesn't like breakpoints?
Go to the project settings and check the Win32-Debug C++ settings. Make sure that Debug Info is at least set for "Program Database". Also, make sure that the Link settings is set for "Include Debug Info".
Contrary to popular belief, debug build does not necessarily mean "include debug info". You can mix and match release build that includes debug info, debug build without debug info, etc. If you couldn't do this, the Project settings wouldn't have that the "Debug Info" dropdown combo in the C/C++ settings.
Regards,
Paul McKenzie
Re: Q: MFC doesn't like breakpoints?
That did it! Thank you! =)