Frequently Asked Question

How to handle "first-chance" exceptions?
Last Updated 3 years ago

When an exception is first thrown, whether from the application itself or dependent or platform code, it is known as a "first-chance" exception. It is not an actual exception that indicates a real problem, but a debugging instrument for C++ code that uses exceptions in normal flow.

The user can edit the debugger settings to disable those "implicit breakpoints" caused by first chance exceptions. An example of this type of exception is shown in the image below:

image

You can find more detailed information on the "first-chance" exceptions in this Microsoft article: https://docs.microsoft.com/en-us/security-risk-detection/concepts/first-chance-exception

The "first-chance" exceptions can be managed by either disabling all C++ exceptions except those explicitly enabled, as shown in the image below:

image

or by enabling all exceptions except those explicitly disabled can be as seen in the image below:

image

More detailed information on how to manage You can find "first-chance" exceptions in this Microsoft article:
https://docs.microsoft.com/en-us/visualstudio/debugger/managing-exceptions-with-the-debugger?view=vs-2019
(Make sure to expand the "C++ Exceptions" group of "Exception Settings")

Note: You can prevent the first chance warning from appearing in the output window of Visual Studio using its context menu (right-click) when it is showing output from "Debug."


image




Please Wait!

Please wait... it will take a second!