### 11.4 The Breakpoint Editor

The breakpoint editor can be accessed from the menu Data->Edit Breakpoints. It allows manipulation of different kinds of breakpoints: at a source location, on a subprogram, at an executable address, on memory access (watchpoints), and on Ada exceptions.

You can double-click on any breakpoint in the list to open the corresponding source editor at the right location. Alternatively, you can select the breakpoint and then click on the `View` button.

The top area provides an interface to create the different kinds of breakpoints, while the bottom area lists existing breakpoints and their characteristics.

It is possible to access advanced breakpoint characteristics for a given breakpoint. First, select a breakpoint in the list. Then, click on the Advanced button, which will display a new dialog window. You can specify commands to run automatically after a breakpoint is hit, or specify how many times a selected breakpoint will be ignored. If running VxWorks AE, you can also change the Scope and Action settings for breakpoints.

#### 11.4.1 Scope/Action Settings for VxWorks AE

In VxWorks AE breakpoints have two extra properties:

- Scope: which task(s) can hit a given breakpoint. Possible Scope values are:
  - task: the breakpoint can only be hit by the task that was active when the breakpoint was set. If the breakpoint is set before the program is run, the breakpoint will affect the environment task
  - pd: any task in the current protection domain can hit that breakpoint
  - any: any task in any protection domain can hit that breakpoint. This setting is only allowed for tasks in the Kernel domain.
- Action: when a task hits a breakpoints, which tasks are stopped:
  - task: stop only the task that hit the breakpoint.
  - pd: stop all tasks in the current protection domain
  - all: stop all breakable tasks in the system

These two properties can be set/changed through the advanced breakpoints characteristics by clicking on the Advanced button. There are two ways of setting these properties:

- Per breakpoint settings: after setting a breakpoint (the default Scope/Action values will be task/task), select the Scope/Action tab in the Advanced settings. To change these settings on a given breakpoint, select it from the breakpoints list, select the desired values of Scope and Action and click on the Update button.
- Default session settings: select the Scope/Action tab in the Advanced settings. Select the desired Scope and Action settings, check the Set as session defaults check box below and click the Close button. From now on, every new breakpoint will have the selected values for Scope and Action.

If you have enabled the preference `Preserve state on exit`, GPS will automatically save the currently set breakpoints, and restore them the next time you debug the same executable. This allows you to immediately start debugging your application again, without reseting the breakpoints every time.