XCode 中的符号断点突然不起作用

发布于 2024-09-24 11:49:31 字数 603 浏览 0 评论 0原文

更新:如果您添加了符号断点并且它们不起作用,呃,“稍等一下”。发布此内容并继续在项目中执行其他操作后,我在某个时刻捕获了 objc_exception_throw 。

我一直在将 -[NSException raise]objc_exception_throw 作为符号断点添加到我的所有项目中,效果很好,但是当我重新创建一个已经疯狂的项目时,符号断点停止工作。

值得一提的是:objc_exception_throw在添加时并没有自动填充Location。每当我过去添加它时,它总是单独添加“libobjc.A.dylib”。

使用“didFinishLaunching”方法运行旧项目

NSArray *a = [NSArray arrayWithObjects:@"hi", nil];
NSLog(@"here is a[2]: %@", [a objectAtIndex:2]);

,我立即在 NSLog 处休息(正如我应该的那样)。使用上述命令运行新项目,我得到一个信号“SIGABRT”并且没有断点。相同的代码,甚至相同的项目,但 XCode 文件不同。

[已解决:请参阅此问题的顶部]

Update: if you've added symbolic breakpoints and they're not working, uh, "wait awhile". After posting this and moving on and doing something else in the project, I then had an objc_exception_throw caught at some point.

I've been adding -[NSException raise] and objc_exception_throw as symbolic breakpoints to all my projects and it's worked great, but as I was recreating a project that had gone bonkers, symbolic breakpoints stopped working.

Worth mentioning: objc_exception_throw, when added, did not auto-fill the Location. Whenever I've added it in the past, it's always put "libobjc.A.dylib" in by itself.

Running the old project with

NSArray *a = [NSArray arrayWithObjects:@"hi", nil];
NSLog(@"here is a[2]: %@", [a objectAtIndex:2]);

in the "didFinishLaunching" method, I immediately get a break at the NSLog (as I should). Running the new project with the above, I get a signal "SIGABRT" and no breakpoint. The same code, even the same project, but different XCode files.

[Solved: see top of this question]

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

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

发布评论

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

评论(1

阳光下的泡沫是彩色的 2024-10-01 11:49:31

这本身就解决了。我的 XCode 可能已损坏或发生其他问题,但如果您遇到上述情况,如果可能的话,请继续并稍后返回异常抛出问题。

This resolved itself. My XCode may be corrupt or something, but if you experience the above, if possible just move on and go back to the exception throwing problem later on.

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