Setting an on-error breakpoint

Setting an on-error breakpoint suspends execution when the program encounters an error condition. You can make the breakpoint apply to all errors, only to unsuppressed errors, or only to a single error condition that you specify. To set an on-error breakpoint:

  1. Open the New Breakpoint dialog by right-clicking in the Breakpoints view and selecting Add Breakpoint.
  2. Select the On Error tab.
  3. Select one of the options:
    • On Any Unsuppressed Error - The breakpoint takes effect only if the error occurs on execution of a statement that does not have the NO-ERROR attribute.
    • On Any Error - The breakpoint takes effect on any error, suppressed or unsuppressed.
    • On Error - The breakpoint takes effect only on the specific error that you identify in the Error Number field.