Some of my favorite Xcode tips & tricks (tested on Xcode 4.5).


Xcode shortcuts

Catch All Exceptions

  1. Bring up breakpoint navigator (⌘6)
  2. Click + on the bottom left
  3. Add Exception Breakpoint

Xcode catch exceptions

Anyone knows the difference with symbolic breakpoint?

NSLog, Auto Continue on Breakpoints

Breakpoints are so much powerful. Don’t limit to just pause on every breakpoint.

You could set actions such as log a message under certain condition, or automatically continue. Or if you are not interested in the first 10 times of a while loop, you can ignore x times before pause. Or even have your Mac speaks out instead of traditional text logging.

Edit a breakpoint for more options:

breakpoints actions

Use of Tabs

  1. Create new tabs with ⌘T
  2. Double click to edit tab name
  3. My workflow uses these tabs: Project Resources, Design, Coding 1, Coding 2, Build

tabs for my workflow

It’s totally up to you to organize your tabs, just like web browsing.

Use of Behaviours

Behaviours are hooks to Xcode for events like build, test, run, and search. You can find them in Preferences > Behaviours.

These are my additional behaviours.

Show Build tab when there is new issue:

Show Build tab when there is new issue

Show console when start running:

Show console when start running

Show Debug tab when paused:

Show Debug tab when paused

More Reference

  1. WWDC 2012 - “Working Efficiently with Xcode” is an excellent introductory
  2. Xcode4 User Guide - Complete, but way too much text
  3. miso blog - from a developer




Back to Home