How to add Exception Breakpoint in Xcode?
Asked Answered
M

3

52

How to add Exception Breakpoint in Xcode?

int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
    [pool release];
    return retVal;
}

My Project randomly crashed in below code, searched in google and some one suggested to add Exception Breakpoint. I added break point by clicking on source line..Editing breakpoint not allow me to change type. How to add Exception Breakpoint and where to add? (in AppDelegate?

enter image description here

Moraceous answered 23/7, 2013 at 6:13 Comment(3)
it doesn't crash in given code.Swatter
@rptwsthi, yup, after adding exception-breakpoint-in-xcode I got exact line of crash. Its great..why not apple by default enable this in debug mode...:)Moraceous
@iPhoneChip: Probably because it just stops there and doesn't provide the information about the exception.Zacharia
S
72

You can easily add Exception Breakpoint in Xcode. See below image:

enter image description here

Smelt answered 23/7, 2013 at 6:16 Comment(0)
P
28

Here are the steps.

  • Move to "Breakpoint Navigator".

  • Click + symbol at bottom-left corner of navigator.

enter image description here

  • You should see this.

enter image description here

Promenade answered 23/7, 2013 at 6:25 Comment(0)
S
27

Follow these steps:

  • In Xcode move to Breakpoint navigator (use command+8 in Xcode 11)
  • Click on the + option at the left bottom of the navigator and select Exception breakpoint.

Exception Breakpoint

  • An exception breakpoint will be immediately added to the Breakpoint list in the Breakpoint navigator
  • you can then edit additional Breakpoint Setting's as shown below.

Breakpoint settings

Swatter answered 23/7, 2013 at 6:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.