Setting Breakpoint Actions and Options

Use the breakpoint editor to specify what Xcode does when a breakpoint is triggered.

To set breakpoint actions and options
  1. In the breakpoint navigator, Control-click the breakpoint, and choose Edit Breakpoint from the shortcut menu.

  2. Set the conditions, actions, and the options for the breakpoint in the breakpoint editor.


    The screenshot shows a file-and-line breakpoint that is ignored the first five times it is hit. No condition is set, and the option to automatically continue after evaluating actions is set. After five hits, the breakpoint is triggered, which causes Xcode to emit a sound and continue program execution.

Each breakpoint type has specific properties that define it, such as condition and ignore count (for file-and-line breakpoints), symbol name (for symbolic breakpoints), and exception type (for exception breakpoints). But all breakpoint types share two properties:

  • Action: Specifies what actions Xcode performs when the breakpoint is triggered. You can have Xcode execute an AppleScript script or a shell or debugger command, log or speak a message, or emit a sound. You can add multiple actions or delete actions using the Add (+) and Delete (–) buttons.

  • Options: Specifies additional breakpoint behavior, such as whether to continue program execution after performing actions.