Keyhab
⌘R
Xcode

Xcode Keyboard Shortcuts for iOS Development

Essential Xcode keyboard shortcuts for iOS and macOS developers. Navigation, editing, debugging, Interface Builder, and simulator shortcuts.

Why Learn Xcode Keyboard Shortcuts?

Xcode is the only IDE for building iOS, macOS, watchOS, and tvOS apps. It is a massive application with hundreds of features, and navigating it with the mouse alone is slow. Mastering keyboard shortcuts lets you build, debug, and ship apps significantly faster.

This guide covers the most important Xcode shortcuts organized by workflow category.

---

Build and Run

These are the shortcuts you will use most often during development.

ActionShortcut
BuildCmd + B
RunCmd + R
StopCmd + .
TestCmd + U
Profile (Instruments)Cmd + I
AnalyzeCmd + Shift + B
Clean Build FolderCmd + Shift + K
Build for TestingCmd + Shift + U

---

ActionShortcut
Open QuicklyCmd + Shift + O
Jump to DefinitionCtrl + Cmd + J
Show/Hide NavigatorCmd + 0
Project NavigatorCmd + 1
Source Control NavigatorCmd + 2
Symbol NavigatorCmd + 3
Find NavigatorCmd + 4
Issue NavigatorCmd + 5
Test NavigatorCmd + 6
Debug NavigatorCmd + 7
Breakpoint NavigatorCmd + 8
Report NavigatorCmd + 9
Show/Hide Debug AreaCmd + Shift + Y
Show/Hide InspectorCmd + Option + 0
Show/Hide LibraryCmd + Shift + L
Jump BarCtrl + 6 (functions in current file)
Go BackCmd + Ctrl + Left
Go ForwardCmd + Ctrl + Right

---

File and Tab Management

ActionShortcut
New TabCmd + T
Close TabCmd + W
New FileCmd + N
Open file in Assistant EditorCmd + Option + Enter
Show Standard EditorCmd + Enter
Next TabCmd + Shift + ]
Previous TabCmd + Shift + [
Show Related ItemsCtrl + 1

---

Editing

ActionShortcut
Comment/UncommentCmd + /
IndentCmd + ]
OutdentCmd + [
Move line upCmd + Option + [
Move line downCmd + Option + ]
Re-indent (auto-format)Ctrl + I
Delete lineCmd + Shift + K (custom)
Fold code blockCmd + Option + Left
Unfold code blockCmd + Option + Right
Fold all methodsCmd + Option + Shift + Left
Unfold all methodsCmd + Option + Shift + Right
Edit All in ScopeCmd + Ctrl + E
Find and ReplaceCmd + Option + F
Find in ProjectCmd + Shift + F

---

Code Completion and Documentation

ActionShortcut
Show completionsEsc or Ctrl + Space
Accept completionTab or Enter
Quick Help (documentation)Option + Click symbol
Open DocumentationCmd + Shift + 0 (zero)
Show callersCtrl + Cmd + Shift + H

---

Debugging

ActionShortcut
Toggle BreakpointCmd + \
Enable/Disable BreakpointsCmd + Y
Continue (Resume)Cmd + Ctrl + Y
Step OverF6
Step IntoF7
Step OutF8
Open Debug ConsoleCmd + Shift + C
Show/Hide Debug AreaCmd + Shift + Y
Add Expression to WatchRight-click in Debug area
View MemoryDebug > Debug Workflow > View Memory

Breakpoint Tips

  • Conditional Breakpoints: Right-click a breakpoint to add conditions, actions, or make it auto-continue.
  • Symbolic Breakpoints: Use Breakpoint Navigator > "+" to add breakpoints on method names like -[UIViewController viewDidAppear:].
  • Exception Breakpoints: Add one to catch all Objective-C or Swift exceptions automatically.

---

Interface Builder / Storyboard

ActionShortcut
Show LibraryCmd + Shift + L
Show Attributes InspectorCmd + Option + 4
Show Size InspectorCmd + Option + 5
Show Connections InspectorCmd + Option + 6
Show Identity InspectorCmd + Option + 3
Zoom to FitCmd + =
Actual SizeCmd + 0
Embed in Stack ViewSelect views > Editor > Embed In > Stack View
Add New ConstraintsBottom of canvas constraint buttons
Update FramesCmd + Option + =
Reset to Suggested ConstraintsCmd + Shift + =

---

SwiftUI Previews

ActionShortcut
Toggle CanvasCmd + Option + Enter
Resume PreviewCmd + Option + P
Live PreviewClick "Play" on preview or use Canvas menu
Preview on DeviceSelect device in Canvas
Pin PreviewClick pin icon in Canvas

---

Simulator Shortcuts

When the iOS Simulator is focused:

ActionShortcut
Home buttonCmd + Shift + H
Rotate leftCmd + Left
Rotate rightCmd + Right
ScreenshotCmd + S
Record videoCmd + R
Shake gestureCmd + Ctrl + Z
Toggle appearance (dark/light)Cmd + Shift + A
Slow animationsDebug > Slow Animations or Cmd + T
Simulate memory warningDebug > Simulate Memory Warning
Toggle keyboardCmd + K
Paste from Mac clipboardCmd + V

---

Source Control (Git)

ActionShortcut
CommitCmd + Option + C
PushSource Control menu
PullSource Control menu
Show Source Control NavigatorCmd + 2
Show ChangesSource Control > Show Changes
Discard ChangesRight-click file > Source Control > Discard

---

Top 10 Xcode Shortcuts for Daily Use

  1. Cmd + R — Run your app.
  2. Cmd + B — Build without running.
  3. Cmd + Shift + O — Open Quickly. The fastest way to jump to any file, class, or method.
  4. Cmd + / — Toggle line comment.
  5. Cmd + \ — Toggle breakpoint.
  6. Cmd + Shift + K — Clean build folder (fixes many mysterious build errors).
  7. Cmd + Shift + Y — Toggle debug area.
  8. Cmd + 0 — Toggle navigator sidebar.
  9. Ctrl + I — Re-indent selected code.
  10. Cmd + Shift + L — Open the library to add UI elements or code snippets.

---

Tips for Mastering Xcode Shortcuts

  1. Learn Open Quickly first. Cmd + Shift + O replaces most of your file navigator usage.
  2. Use the navigator numbers. Cmd + 1 through Cmd + 9 switch between navigator tabs instantly.
  3. Customize shortcuts in Xcode > Settings > Key Bindings if the defaults do not suit you.
  4. Practice with spaced repetition. Tools like Keyhab let you drill Xcode shortcuts daily until they become muscle memory.

---

Conclusion

Xcode is a complex IDE, but its keyboard shortcuts make it manageable and efficient. Start with the build/run and navigation shortcuts, then expand to editing and debugging as you become comfortable. Daily practice will transform your iOS development workflow.

⌘R

Learn Xcode shortcuts with quick quizzes

Keyhab quizzes you on 1,050 shortcuts for 15 tools, from Basics to Advanced. Five minutes a day on iPhone or iPad — VSCode (Mac) and Vim Basics are free.

Download free on the App Store

Related