Xcode 4: Exceptions not being logged to the console

Viewed 1435

I recently upgraded to Xcode 4 and have not yet figured out how to have exceptions and error messages logged to the run console.

Example: In Xcode 3, [[NSArray array] objectAtIndex:1] results in the following being logged to the console.

2011-08-10 10:27:22.061 App[28662:40b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSArray objectAtIndex:]: index 1 beyond bounds for empty array'
    *** Call stack at first throw:
(
    0   CoreFoundation                      0x015babe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x0170f5c2 objc_exception_throw + 47
    2   CoreFoundation                      0x015b080c -[__NSArrayI objectAtIndex:] + 236
    3   App                                 0x00002514 -[AppDelegate application:didFinishLaunchingWithOptions:] + 357
    4   UIKit                               0x003fc1fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
    5   UIKit                               0x003fe55e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
    6   UIKit                               0x00408db2 -[UIApplication handleEvent:withNewEvent:] + 1533
    7   UIKit                               0x00401202 -[UIApplication sendEvent:] + 71
    8   UIKit                               0x00406732 _UIApplicationHandleEvent + 7576
    9   GraphicsServices                    0x01c24a36 PurpleEventCallback + 1550
    10  CoreFoundation                      0x0159c064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    11  CoreFoundation                      0x014fc6f7 __CFRunLoopDoSource1 + 215
    12  CoreFoundation                      0x014f9983 __CFRunLoopRun + 979
    13  CoreFoundation                      0x014f9240 CFRunLoopRunSpecific + 208
    14  CoreFoundation                      0x014f9161 CFRunLoopRunInMode + 97
    15  UIKit                               0x003fdfa8 -[UIApplication _run] + 636
    16  UIKit                               0x0040a42e UIApplicationMain + 1160
    17  App                                 0x00002393 main + 85

This exception does not log anything to the console in Xcode 4.

I am able to view the call stack by adding an exception breakpoint - however, continuing past the exception breakpoint does not log anything to the console (not even a vague SIGABRT or EXC_BAD_ACCESS message).

I have "Log Exceptions" and "Enable Zombie Objects" checked in the Edit Scheme window's Diagnostics tab, but it hasn't helped. Are there any other settings I could possibly be missing?

Thanks so much.

5 Answers
Related