Browse all keyboard shortcut cheat sheets

Xcode Keyboard Shortcuts (Latest) — Complete Cheat Sheet

Xcode keyboard shortcuts for building, running, debugging, navigating code, using the editor, and managing the Interface Builder — everything a Swift or Objective-C developer needs.

39 shortcuts across 4 categories · macOS

Xcode is Apple's official IDE for building iOS, macOS, watchOS, and tvOS apps, and mastering its keyboard shortcuts is essential for professional Apple platform development. From building and running apps (Cmd+R) to running the full test suite (Cmd+U) and navigating between files (Cmd+Shift+O), Xcode shortcuts keep development momentum high in a complex, multi-window environment.

Build & Run

ActionShortcutDescription
Build Cmd + B Build the current target
Run Cmd + R Build and run the current scheme
Stop Cmd + . Stop the running build or app
Test Cmd + U Build and run all unit tests
Test Again Ctrl + Cmd + G Re-run the last test or test set
Clean Build Folder Cmd + Shift + K Delete all build artefacts in the build folder
Analyse Cmd + Shift + B Run the static analyser to find potential issues
Profile Cmd + I Build and profile the app with Instruments

Code Editing

ActionShortcutDescription
Quick Open Cmd + Shift + O Open any file, symbol, or framework by name
Jump to Definition Ctrl + Cmd + J Navigate to the definition of the symbol under the cursor
Jump to Declaration Ctrl + Cmd + D Show a pop-up with the declaration of the hovered symbol
Find in Workspace Cmd + Shift + F Search across all files in the project
Find and Replace in Workspace Cmd + Shift + H Find and replace text across all project files
Edit All in Scope Ctrl + Cmd + E Select all occurrences of the current symbol to rename them together
Comment / Uncomment Lines Cmd + / Toggle single-line comments on selected lines
Re-indent Selection Ctrl + I Auto-indent the selected code block
Move Line Up Cmd + Alt + [ Move the current line up
Move Line Down Cmd + Alt + ] Move the current line down
Fold / Unfold Block Cmd + Alt + Fold or unfold the code block at the cursor
Show Code Completions Ctrl + Space Trigger code completion at the cursor

Navigation

ActionShortcutDescription
Go Back Ctrl + Cmd + Navigate back through cursor history
Go Forward Ctrl + Cmd + Navigate forward through cursor history
Switch Between Header and Source Ctrl + Cmd + Toggle between a .h header file and its .m implementation
Open Quickly Cmd + Shift + O Quickly open any file or symbol in the project
Reveal in Project Navigator Cmd + Shift + J Show the current file in the Project Navigator
Go to Line Cmd + L Jump to a specific line number in the current file
Show Project Navigator Cmd + 1 Open the Project Navigator panel
Show Symbol Navigator Cmd + 2 Open the Symbol Navigator panel
Show Issues Navigator Cmd + 4 Open the Issues (errors & warnings) Navigator
Show Debug Navigator Cmd + 6 Open the Debug Navigator panel
Show Breakpoint Navigator Cmd + 7 Open the Breakpoint Navigator panel
Show Report Navigator Cmd + 8 Open the Report (build logs) Navigator panel

Debugging

ActionShortcutDescription
Add / Remove Breakpoint Cmd + \ Toggle a breakpoint on the current line
Enable / Disable Breakpoint Cmd + Shift + \ Toggle the active state of the breakpoint on the current line
Continue Execution Ctrl + Cmd + Y Resume program execution after hitting a breakpoint
Step Over F6 Execute the next line without entering function calls
Step Into F7 Step into the next function call
Step Out F8 Step out of the current function
Activate / Deactivate Breakpoints Cmd + Y Globally enable or disable all breakpoints

Xcode Tips & Tricks

  • Ctrl+Cmd+E renames a symbol everywhere in scope: Place the cursor on a variable or function name and press Ctrl+Cmd+E to enter 'Edit All in Scope' mode. Every occurrence in the current file highlights and any typing renames all instances simultaneously — safer than Find & Replace.
  • Cmd+Shift+O to open any file or symbol instantly: Quick Open (Cmd+Shift+O) is a fuzzy finder for files AND Swift/ObjC symbols. Type part of a class name, function, or file name to jump there immediately — faster than navigating the Project Navigator for large codebases.
  • F6/F7/F8 for clean breakpoint navigation: When paused at a breakpoint, use F6 to step over (stay at the same level), F7 to step into the next function call, and F8 to step out and return to the caller. These three keys alone cover most debugging sessions.

Frequently Asked Questions — Xcode

How do I build and run my app in Xcode?
Press Cmd+R to build and run the app on the selected simulator or connected device. Press Cmd+B to build without running (useful to check for compile errors). Press Cmd+. (period) to stop the currently running app immediately. Switch destination devices using the toolbar device picker.
How do I quickly open a file in Xcode?
Press Cmd+Shift+O to open the Open Quickly dialog, which searches across all files, classes, and symbols in your project by name. Start typing the filename or class name (even initials using camelCase — e.g., 'VDC' finds 'ViewController') and press Enter to open the match.
How do I run tests in Xcode?
Press Cmd+U to run all tests in the current scheme. Press Ctrl+Option+Cmd+U to run just the test method at the cursor position. Press Ctrl+Option+Cmd+G to re-run the last test without moving the cursor. Test results appear in the Test navigator and inline in the source editor.
How do I add a breakpoint in Xcode?
Click in the gutter (to the left of the line numbers) to toggle a breakpoint on that line. Press F6 to step over a line while paused at a breakpoint, F7 to step into a function call, and Cmd+Ctrl+Y to continue execution until the next breakpoint is hit.

How to Learn Xcode Keyboard Shortcuts

Xcode is Apple's integrated development environment for building applications across the Apple platform ecosystem — iOS, macOS, watchOS, tvOS, and visionOS. Its keyboard shortcuts reflect the complexity of its environment: separate shortcut sets exist for the code editor, Interface Builder (UI design), the simulator, the debugger, and the test runner. The most frequently used Xcode shortcuts are Cmd+R to build and run, Cmd+B to build without running, Cmd+U to run the unit test suite, and Cmd+Shift+O to open a file by name quickly (Xcode's equivalent of VS Code's Ctrl+P Quick Open). These four shortcuts alone cover the build-run-test cycle that occupies the majority of an iOS or macOS developer's working day.

Xcode's editor shortcuts deserve attention because they differ in important ways from VS Code, which many Apple developers also use. Ctrl+I re-indents the selected code according to Xcode's language rules — essential after pasting code from documentation or Stack Overflow. Ctrl+6 opens a symbol navigator popup within the current file, showing all methods, properties, and classes with fuzzy search. Cmd+Shift+J reveals the current file in the Project Navigator sidebar. For debugging, Ctrl+F6 steps over a line, Ctrl+F7 steps into a function, and Ctrl+F8 steps out — following the debugger convention shared across most IDEs. The Cmd+Control+Z shortcut to open the Version Editor (showing inline git blame and history) is a powerful but rarely known Xcode feature for understanding when and why code changed.