Find the real exception in Xcode debugger

Published on February 4, 2012

There are times when you have exceptions raised in Xcode, but it breaks at UIApplicationMain in main(), and without giving you clues on where the error comes from.

There is a way to show more helpful debugging info.

Basically you need to set a breakpoint at objc_exception_throw.

If you are using Xcode 4.2, you can do the following:

  1. Go to Breakpoint Navigator pane (or press ⌘6)
  2. Click on the add icon on the bottom left
  3. Add symbolic breakpoint
  4. Enter objc_exception_throw for Symbol

Yeah. Find and burn those terrible bugs!