Xcode exception breakpoint doesn’t print details of the exception being thrown

I will update Jeff’s answer here:

To have both the line causing the exception highlighted (and not UIApplicationMain() in main.m) AND to see the reason for the exception (e.g., “error: A fetch request must have an entity.”), do this:

  • In the Breakpoint navigator:
    1. Add (+), Add Exception Breakpoint
    2. Select the new breakpoint, Control-Click, Edit Breakpoint
    3. Add Action
    4. Enter: po $arg1

The relevant part of the stack trace will be in the nagivator area.

This seems to still work in Xcode 9

Here is my addition for use with Xcode 6 and below.

  1. Enter: po (NSException*) $eax

In Xcode 6 you must explicitly provide the object type because it is no longer inferred.

Leave a Comment