locked
"first-chance exception" message vs. dialog RRS feed

  • Question

  • Using Visual Studio 2008, debugging non-managed C++ . . . 

    I'm used to seeing "first-chance exception" messages in the output when debugging.

    While recently debugging the Windows SDK v6.1 AMCap sample, I was surprised to also see a dialog pop up with the same message and Break/Continue/Ignore buttons.  I'm guessing that there's some solution or project specific setting that (dis-)allows this dialog, but I can't find it.

    Can anyone tell me if/where this behavior is controlled?

    Thanks . . .

    ex-eunuchs hacker
    Thursday, June 4, 2009 1:07 PM

Answers

  • Hi,

    You can control which exceptions cause the exception dialog to appear using the Debug->Exceptions dialog.

    Thanks
    Jon
    Jonathan Boles - Visual Studio Debugger QA
    • Proposed as answer by liurong luo Friday, June 5, 2009 9:19 AM
    • Marked as answer by Doctor Bonzo Friday, August 14, 2009 2:10 PM
    Friday, June 5, 2009 1:44 AM
  • Hello,

    There are two types of Exceptions for the debugger: first chance exception and second chance exception. When our application being debugged, the Debugger got notified whenever it encountered an exception. If we handled the exception properly in our catch block, then, our application continue runs happily. Those exceptions handled by our catch clause are called "first chance exception", any unhandled exceptions are called second chance exception.

    We could enable Visual Studio Debugger to break by checking the Thrown option in Debug->Exception

    If we want the exception assistant, please try to check "Enable the exception assistant" in Tools->Options...->Debugging->General

    Please have a try and tell me the result.
    Best regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by liurong luo Thursday, June 11, 2009 1:31 AM
    Wednesday, June 10, 2009 6:43 AM

All replies

  • Hi,

    You can control which exceptions cause the exception dialog to appear using the Debug->Exceptions dialog.

    Thanks
    Jon
    Jonathan Boles - Visual Studio Debugger QA
    • Proposed as answer by liurong luo Friday, June 5, 2009 9:19 AM
    • Marked as answer by Doctor Bonzo Friday, August 14, 2009 2:10 PM
    Friday, June 5, 2009 1:44 AM
  • Hello,

    There are two types of Exceptions for the debugger: first chance exception and second chance exception. When our application being debugged, the Debugger got notified whenever it encountered an exception. If we handled the exception properly in our catch block, then, our application continue runs happily. Those exceptions handled by our catch clause are called "first chance exception", any unhandled exceptions are called second chance exception.

    We could enable Visual Studio Debugger to break by checking the Thrown option in Debug->Exception

    If we want the exception assistant, please try to check "Enable the exception assistant" in Tools->Options...->Debugging->General

    Please have a try and tell me the result.
    Best regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by liurong luo Thursday, June 11, 2009 1:31 AM
    Wednesday, June 10, 2009 6:43 AM