断点停止但没有例外 [英] Breakpoint stops but no exception

查看:100
本文介绍了断点停止但没有例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 AVAudioRecorder 实例上调用 stop 时,XCode会在断点处停止。但是,也没有例外,我没有在此处设置自己的断点。我确实有一个所有例外断点设置。

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.

这是怎么回事?

推荐答案

所有异常断点。 AV Foundation会引发并捕获异常,因此不会造成伤害,不会造成犯规(这就是为什么应用程序可以毫无问题地继续运行的原因)-但您一定会在发生这种情况时中断,所以可以。当应用真正运行时(独立于Xcode),没人会知道。只是Xcode和您的All Exceptions断点使它浮出水面。

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到处都是这样。我认为它是一个错误,但不足以非常关心。使用AV Foundation时,我只是关闭断点;否则我们将永远停止...

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

这篇关于断点停止但没有例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆