Always Stop in App Delegate After Enabling All Exceptions Break Point

Always stop in App delegate after enabling All exceptions break point

Only enable Objective-C breakpoints.

To see the actual statement that is causing the error add an exception breakpoint:

  1. From the Main Menu Debug:Breakpoints:Create Exception Breakpoint.

  2. Right-click the breakpoint and set the exception to Objective-C. This will ignore other types of exceptions such as from C++. There are parts of the APIs that use exceptions such as Core Data (Apple is Special).

  3. Add an action: "po $arg1".

Run the app to get the breakpoint and you will be at the line that causes the exception and the error message will be in the debugger console.

Breakpoint example:

Sample Image

Always trigger the all exceptions break point

Possible solutions for it could be:

  • Added custom font can cause this issue so, apparently delete (replace) it, somewhere in project is still his reference which causes C++ exception.

So, Delete or Replace all references to those fonts, Clean the project and check.

  • Change from All Exceptions to Objective-C Exceptions in All Exceptions.

Check this answers will help more:

Xcode throws an exception in Main() in iOS 8 with 'all exceptions' breakpoint

Always stop in App delegate after enabling All exceptions break point

Try and check if it help:)

App SIGABRTs on AppDelegate

It turns out that I had an unrecognized selector sent to instance 0xABC123 exception being thrown. I only discovered this because I used the inline closure:

NSSetUncaughtExceptionHandler { exception in
print(exception)
print(exception.callStackSymbols)
}

at the end of my application(_:didFinishLaunchingWithOptions:) method in my AppDelegate. For some reason the symbolic any exception breakpoint wasn't providing me with the same amount of detail.

Xcode throws an exception in Main() in iOS 8 with 'all exceptions' breakpoint

As stated in the comments, you should turn off catching the C++ exceptions by editing your All Exceptions breakpoint.

In order to do that, right click on your breakpoint and change Exception from All to Objective-C:

change All to Objective-C

Exceptions in C++ code are part of normal app functionality. However, exception breakpoint is not catching unhandled but every raised exceptions, even when they're handled correctly later on, hence the stop in execution.

xCode - App stop on a not existing breakpoint

before assign value to MCCVsISDCode kindly init it first.

Exception breakPoint at [self.window makeKeyAndVisible]

Edit Exception breakpoint like this-

Sample Image

And select Objective C like this-

Sample Image

Hope this helps!

How to debug with breakpoint when crash line is the App Delegate?

In this case you can set exception breakpoints

here

demo

and then here (in Exceptions -> All)

demo2

xCode - App stop on a not existing breakpoint

before assign value to MCCVsISDCode kindly init it first.

Xcode always stopping at main.m after a crash

They changed the behavior, follow this tutorial to break on all exceptions

EDIT:(Link might rot, so I will duplicate the info here)

One of the hidden gems in Xcode 4.2 is the “Exception Breakpoint” feature. Once you enable it, your debugging life becomes much easier because whenever an exception is thrown in your app, Xcode will bring up the line of code that caused the exception to occur. This is particularly useful if your call stack window is empty (which I have seen happen sometimes while working on iOS apps). Instead of relying on a brief error message in the Output pane, which doesn’t contain much more than the type of exception and its error message, you get to see exactly where the problem is!

You can add an Exception Breakpoint by opening up the Breakpoint Navigator pane, and clicking on the X button in the bottom left corner:

Sample Image

After clicking the “Add Exception Breakpoint…” menu item, you will see this breakpoint configuration view open up:

Sample Image

Click the Done button and you will the new Exception Breakpoint in your list of breakpoints. If you want to have all of your Xcode workspaces include the Exception Breakpoint, right-click (Ctrl + click) on it and open the “Move Breakpoint To” menu item:

Sample Image

After clicking “User” in the submenu, you will see that the Exception Breakpoint is in the User group of breakpoints. Open up another project and it automatically be included in the list of breakpoints.

Sample Image

Happy debugging!



Related Topics



Leave a reply



Submit