Create Exception Breakpoint Filtering

Type name and package name filtering can be set up for Java exception breakpoints. This can be done from an exception breakpoints' Filtering properties page, as shown in the following figure.

Java Breakpoint Exception Filtering Properties Page

Using the Filtering properties page there are four ways to add filtering for a Java exception breakpoint:

  1. You can select specific threads to restrict the breakpoint to (which must be done while in a debug session)
  2. You can use the Add Class button to select a class via the Type Selection Dialog
  3. You can use the Add Package button to select a package using a filtered Type Selection Dialog
  4. You can use the Add button to define your own pattern to match as a class and/or package filter

Defining Your Own Filter Pattern

Using the Add button mentioned above, you can define your own pattern to be used as a filter for a Java exception breakpoint. Once pressed, you can then
enter any expression in the new space in the Selected Locations list, as shown in the following figure.

Add Filter Pattern

There are some rules to follow when creating your own pattern.

  1. Your pattern can only contain a '*' at the end
  2. Your pattern must be fully qualified, E.g. a.b.c.MyClass
  3. Your pattern cannot have spaces in it

Examples