Xcode 7: exception breakpoint firing in `main.m`, but app runs normally

I've set an "All Exceptions" exception breakpoint for my project. In Xcode 7, it mysteriously fires on launch in main.m, but there doesn't seem to be anything obviously wrong. On continuing, the app runs normally.

Even running the project in Xcode 6 now causes this breakpoint to fire.

I can't figure out what is causing this. The threads don't indicate anything specific to what the cause is.

Maybe it's some sort of font issue in the Storyboard or something? Does anyone know a fix?

NOTE: It's a C++ exception, not Objective-C. Perhaps due to missing fonts. Xcode throws an exception in Main() in iOS 8 with 'all exceptions' breakpoint


I have almost the identical problem in Xcode 7, as of beta 3. This workaround solved it for me.

Because it's a C++ exception, you can change your "All Exceptions" breakpoint to catch only Objective-C exceptions. Having done this, I no longer hit the mystery break on startup, and because I'm not writing C++, get 99% of the value of having the "All Exceptions" break point on.

Here's how:

  1. Go to the breakpoints tab (View > Navigators > Show Breakpoint Navigator or ⌘7).
  2. Right click on the All Exceptions breakpoint and "Edit Breakpoint..."

  1. Change the Exceptions covered to Objective-C only.

I started seeing the same behaviour in my application using the shorthand dictionary initialisation @{ ...: ... } in the willFinishLaunchingWithOptions function.

The problem was solved by replacing it with dictionaryWithObjectsAndKeys instead. I'm not sure if this was specific to my case or if the compiler has some kind of a problem with the shorthand syntax, but it's worth checking out if you're using that syntax.

Need Your Help