Share via


How to Break on Errors

You can specify if the debugger breaks on the next error. If the debugger is set to break on errors, then it breaks execution both on errors that are handled in code and on unhandled errors. By default, the debugger is set to break on errors.

When the debugger breaks on an error, you can inspect variables and parameters. You can also review the error message in the Debugger window, on the Home tab, in the Show group, by choosing Last Error.

For more information about how to open the Debugger window, see Activating the Debugger.

To break on errors

  1. Activate the debugger. For more information, see How to: Activate the Debugger from the Development Environment or How to: Activate the Debugger at the Command Prompt.

  2. In the Debugger window, on the Home tab, in the Breakpoints group, choose Break Rules.

  3. In the Debugger Break Rules window, select the Break On Error check box, and then choose the OK button.

See Also

How to: Manage Breakpoints from the Development Environment
How to: Manage Breakpoints from the Debugger Breakpoint List
How to: Break on the Next Statement
How to: Break on Record Changes
How to: Set Conditional Breakpoints
Breakpoints