Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // First method :
- //
- // In XCode 4 click your project and choose the breakpoints tab.
- // At the bottom of that tab is +/- search bar, choose the + item and "Add Exeception Breakpoint".
- // You can leave it at All or choose Objective-C.
- // This way you will break in the debugger and be able to see what caused the exeception.
- //
- // Second method:
- //
- #ifdef DEBUG
- void eHandler(NSException *);
- void eHandler(NSException *exception) {
- NSLog(@"%@", exception);
- NSLog(@"%@", [exception callStackSymbols]);
- }
- #endif
- int main(int argc, char *argv[]) {
- #ifdef DEBUG
- NSSetUncaughtExceptionHandler(&eHandler);
- #endif
- // ...rest of your main function here...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement