CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 1999
    Location
    Alabama USA
    Posts
    32

    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.






  2. #2
    Join Date
    Apr 1999
    Posts
    90

    Re: Q: MFC doesn't like breakpoints?

    You're in release mode, not debug...


  3. #3
    Join Date
    Apr 1999
    Location
    Frankfurt, Germany
    Posts
    113

    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...


  4. #4
    Join Date
    Apr 1999
    Location
    Alabama USA
    Posts
    32

    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?



  5. #5
    Join Date
    Apr 1999
    Posts
    27,449

    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


  6. #6
    Join Date
    Apr 1999
    Location
    Alabama USA
    Posts
    32

    Re: Q: MFC doesn't like breakpoints?

    That did it! Thank you! =)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured