如何在 _NSLockError() 上设置断点

发布于 2024-08-31 00:39:08 字数 169 浏览 8 评论 0原文

我正在尝试调试多个线程。

 *** -[NSLock lock]: deadlock (<NSLock: 0xc388ab0> '(null)')
 *** Break on _NSLockError() to debug.

我该如何调试这个?

I am trying to debug multiple threads.

 *** -[NSLock lock]: deadlock (<NSLock: 0xc388ab0> '(null)')
 *** Break on _NSLockError() to debug.

How can I debug this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十雾 2024-09-07 00:39:08

如果您使用 Xcode 调试器(在后台使用 gdb),请暂停应用程序并在控制台中输入:

b _NSLockError

然后,调试器将在 _NSLockError 发生时停止应用程序,您应该能够检查回溯。

If you're using the Xcode debugger (which uses gdb under the hood), pause the app and in the console enter:

b _NSLockError

Then the debugger will stop the app when _NSLockError happens, which you should be able to check the backtrace.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文