如果 case 为 false,尽管换行,Xcode 断点仍会触发
很难用语言表达,所以这里是一个实际的屏幕:
正如文本所说,它“在断点处停止”。问题是,如果 case 是假的。它不应该中断,因为断点位于 if 情况内。
我尝试将 int a = 1;和 a = 2 周围的 BriefLog (这是一个 NSLog 风格的宏),因为有时它会对行感到困惑,但没有运气。知道这是怎么回事吗?由于这个方法被调用了很多,所以调试非常困难。 :(
Hard to put in words, so here is an screen of this in action:
As the text says, it "stopped at breakpoint". The problem is, that if case is false. It shouldn't break, since the breakpoint is within the if case.
I tried putting the int a = 1; and a = 2 around the BriefLog (which is a NSLog style macro) as sometimes it gets confused about lines, but no luck. Any idea what's up with this? Making debugging really hard cause this method is called quite a lot. :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用 LLVM2 而不是 LLVM GCC。
如果您的项目来自 XCode3,尤其是您的编译器可能设置为后者。
LLVM GCC 代码中的调试器可以具有“个性”。
LLVM2 有一个更复杂的编译器,但这是一件好事,而且调试似乎更加稳定,尤其是在 OS X 项目中使用 LLDB 时。
更少的未访问断点和奇怪的非工作性。
Try using LLVM2 rather than LLVM GCC.
If your project came from XCode3 especially your compiler may be set at the latter.
The debugger in LLVM GCC code can have a 'personality'.
LLVM2 has a fussier compiler but it's a good thing and the debugging seems to be a lot more stable especially if you use LLDB with OS X projects.
Less non-visited breakpoints and odd non-workingness.
这是 Xcode 4 的错。调试 ObjC 代码就像在专业牌桌上玩扑克而不了解规则一样。提交一个错误并希望 Xcode 4.1 尽快发布并修复它。
Its Xcode 4's fault. Debugging of ObjC code is just like playing Poker at a pro table without knowing the rules. File a bug and hope that Xcode 4.1 comes soon and fixes it.