In Paul Hegarty’s excellent CS 193 iPhone Application Development lectures, #40 has some great tips on debugging.

In it Paul shows a really cool way of configuring the XCode debugger so that any time an exception is raised, the debugger stops instantly and shows you the offending line of code.

Simply open up your XCode (4.2.1) breakpoint navigator:

Click the plus sign at the bottom and add an Exception Break Point:

And then just take the default All Exceptions, Break On Throw

Voila! Now whenever an exception is raised, your debugger will stop instantly and point out the offending line.