XCode 中的符号断点突然不起作用
更新:如果您添加了符号断点并且它们不起作用,呃,“稍等一下”。发布此内容并继续在项目中执行其他操作后,我在某个时刻捕获了 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这本身就解决了。我的 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.