0

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

OdieO
  • 6,836
  • 7
  • 56
  • 88

2 Answers2

2

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...

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • matt's answer is correct with turning off the All Exceptions breakpoint and see what happens if you run into odd bugs. I experienced a similar problem and deactivating it resolved the issue: https://stackoverflow.com/questions/45789485/swift-ios-uiimagepickers-photo-library-is-presented-on-simulator-but-crashes/45907622?noredirect=1#comment78774434_45907622 – Lance Samaria Aug 27 '17 at 18:36
-1

Try 'step in' at method declaration in your code. This should take you to the definition of method being called, and you can 'step over' from there. Hope this may help you.

Ali_Waris
  • 1,944
  • 2
  • 28
  • 46