Search code examples
iphonexcodedebuggingxcode4.2lldb

With Break On Exception enabled app always breaks in main.m in Xcode 4.2


I've added a Break on Exception breakpoint as discussed on previous threads and discussed here so that my app will break at the relevant place in my code when an exception happends but now every time I launch the app, Xcode breaks instantly in main.m at this line:

@autoreleasepool {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}

No error message is displayed or shown in the log the only log output is (lldb).

The app does not appear to have crashed and the app does not crash or break at this line if I remove the Break on Exception rule.

I'm using the LLDB debugger and Automatic Reference Counting.


Solution

  • I had the same problem when I switched to LLDB. I switched back to GDB and this fixed it. Not ideal but works. See this post: Exception Breakpoints - LLDB Results vs. GDB

    Have you tried running on the device with LLDB and Break on Exception?