Excuse my ignorance, but something\'s been bugging me about the Xcode debugger when running iPhone applications in the iPhone Simulator.
Sometimes, when I mess somet
You can wrap your UIApplicationMain in a try/catch:
int main(int argc, char *argv[]) {
int retVal;
NSAutoreleasePool * pool;
@try
{
pool = [[NSAutoreleasePool alloc] init];
retVal = UIApplicationMain(argc, argv, nil, nil);
}
@catch(NSException* e)
{
NSLog(@"%@", e.reason);
}
@finally
{
[pool release];
}
return retVal;
}
You should also look up into setting an assertion handler while debugging: NSAssertionHandler.
Update: and also the unhandled exception handler: NSSetUncaughtExceptionHandler