如何在 _NSLockError() 上设置断点
我正在尝试调试多个线程。
*** -[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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 Xcode 调试器(在后台使用 gdb),请暂停应用程序并在控制台中输入:
然后,调试器将在 _NSLockError 发生时停止应用程序,您应该能够检查回溯。
If you're using the Xcode debugger (which uses gdb under the hood), pause the app and in the console enter:
Then the debugger will stop the app when _NSLockError happens, which you should be able to check the backtrace.