Search code examples
xcodebreakpoints

Breakpoint stops but no exception


When I call stop on my AVAudioRecorder instance XCode stops at a breakpoint. However, no exception comes up and I don't have my own breakpoint set there. I do have an "All Exceptions" breakpoint setup.

I hit continue and the app runs fine - no message in the console.

What's going on?

enter image description here


Solution

  • It is the All Exceptions breakpoint. AV Foundation is throwing an exception and also catching it, so no harm, no foul (which is why the app can resume without a problem) - but you are set to break when that happens, so you do. When the app runs for real (independent of Xcode) no one will know; it's just Xcode and your All Exceptions breakpoint that brings it to the surface.

    AV Foundation is full of places like this. I regard it as a bug, but not enough to care very much. I just turn off the breakpoint when working with AV Foundation; otherwise we'd always be stopping...