Mac, iOS

Xcode 4.5 Tips & Tricks

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

Shortcut

Catch All Exceptions

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

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:

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

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 console when start running:

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

Comments