Thursday, June 28, 2007

Uncaught Exceptions in Xcode

Do you receive internal errors due to uncaught exceptions in Xcode? Here is how to find the root of the problem:

1. Start Xcode under GDB and throw a breakpoint on -[NSException raise:]

2. Also throw a breakpoint on objc_exception_throw, since @throw generates that, and doesn't necessarily call through -[NSException raise]. Between the two though you'll cover all your bases!

.