Wednesday November 23, 2011

Exception Backtraces in Xcode 4.2

I tweeted this Stack Overflow answer about getting exception backtraces yesterday and got so much favorite/retweet love that I figured I should mention it here, too.

In Xcode 4.2 and iOS 5, exceptions that crash your application are no longer breaking on the line where the exception occurred. The debugger just dumps you right in main() and no backtrace is printed out or navigatable on the left side panel. Well, as this answer demonstrates, that old out-of-the-box feature has been converted into exception breakpoints. You need to create one yourself and then you’ll get the old useful behavior back!