Setting Breakpoint Actions and Options

Specify what Xcode does when a breakpoint is triggered with the breakpoint editor.

bullet
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 actions and the options for the breakpoint in the breakpoint editor.

    ../art/breakpoint-action-sound.jpg

    The screenshot shows a file line breakpoint that is ignored the first five times it is hit. Subsequent hits trigger the breakpoint, 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 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.

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