Share via


Changing How the Debugger Handles Exceptions (Windows Embedded CE 6.0)

1/5/2010

When an exception occurs, the debugger writes an exception message to the Output window. Alternatively, the debugger can break execution of the program when an exception occurs, giving you a chance to debug it.

Note

The debugger does not handle exceptions in managed code.

You can choose whether you want the debugger to break on a given type of exception or on a category of exceptions.

To change how the debugger handles an exception or category of exceptions

  1. From the Debug menu, click Exceptions…

    The Exceptionsdialog box opens.

  2. In the Exceptions list, use the list control to select the individual exception or category of exceptions whose handling you want to change.

    The Exceptions dialog box then displays the exception number, description, and action for that exception. The following list provides more information about the actions you can select:

    • If you want execution to break as soon as the exception occurs, and not allow the exception handler to execute, select Stop Always.
    • If you want the handler to attempt to fix the issue that caused the exception, select Stop if Not Handled.
  3. Click OK.

When the debugger breaks on an exception, you can look at the source window to see where the exception occurred and use the Watch Window or QuickWatch Dialog Box to see variable contents.

See Also

Tasks

Handling an Exception

Reference

Exceptions Dialog Box

Other Resources

Exception Handling