⌥+⌃AltPlusCtrl

How to Set a Breakpoint in Xcode (Cmd+\\)

Mac: Cmd+\\
Cmd+\\ toggles a breakpoint on the current line, marking it so that execution pauses there the next time the debugger reaches that line during a running app — the entry point into Xcode's full interactive debugging toolchain. **What happens once execution pauses**: the app freezes at that exact line (before it executes), Xcode switches to the debug navigator showing the current call stack, and the Variables View in the debug area shows every local variable's current value at that paused moment, letting you inspect exactly what state the program is in. **Stepping through code from a paused breakpoint**: Step Over (F6) moves execution past the current line to whatever comes next, leaving any function it calls unopened and untouched rather than descending into its internals, while Step Into (a separate related command) would instead follow execution into a called function's own first line — the choice between the two depends on whether the bug you're chasing might be inside that called function or not. **Conditional and other advanced breakpoint types**: right-clicking an existing breakpoint marker in the gutter opens options to add a condition (only pausing when a specified expression evaluates true), the fix for a bug that only shows up on, say, the hundredth pass through a loop — without a condition attached you'd otherwise be clicking Continue by hand dozens of times just to reach the iteration where things actually break. **Disabling versus deleting**: clicking an existing breakpoint marker toggles it between enabled (solid blue) and disabled (dimmed) without removing it entirely, useful for temporarily turning off a breakpoint you want to keep for later without losing its configuration, as opposed to dragging it out of the gutter to delete it permanently. **Related shortcuts**: Cmd+R to build and run with the debugger attached automatically, and F6 for stepping over code once execution is paused at a breakpoint. **Breakpoints persist across sessions**: unlike some lighter-weight debugging tools, breakpoints set with Cmd+\ are saved as part of the project's workspace state, meaning quitting and relaunching Xcode entirely doesn't clear them out, which is exactly what you want when chasing an intermittent bug across several separate sessions spread out over days rather than a single sitting. **Breakpoint navigator for managing many at once**: once a project accumulates several breakpoints across different files, the Breakpoint Navigator sidebar (a dedicated tab in the left-hand navigator area) lists every one of them in a single scrollable view, letting you enable, disable, or delete them in bulk rather than needing to visit each file individually to manage its breakpoints one at a time. **Symbolic and exception breakpoints**: beyond simple line breakpoints toggled with Cmd+\, Xcode also supports symbolic breakpoints (pausing whenever a specific named function is called, regardless of which file calls it) and exception breakpoints (pausing automatically whenever any exception is thrown, even before you've identified which specific line is responsible) — both configured through the Breakpoint Navigator rather than the simple line-toggle shortcut, and worth knowing about for bugs that don't have an obvious single line to attach a normal breakpoint to.

Related shortcuts