简体   繁体   English

XCode 4.6断点不起作用

[英]XCode 4.6 breakpoints not working

I've just upgraded to XCode 4.6 and iOS 6.1 and breakpoints have stopped working in the simulator (not tested device). 我刚刚升级到XCode 4.6和iOS 6.1,断点已停止在模拟器(未经测试的设备)中工作。 Changing debuggers to GDB fixes it but I usually work with LLDB. 将调试器更改为GDB会修复它,但我通常使用LLDB。

Nothing in the project has changed, they just stopped working after the upgrade. 项目中没有任何内容发生变化,它们在升级后就停止了工作。 I've cleaned and deleted derived data and checked all of the debug settings but nothing is wrong. 我已经清理并删除了派生数据并检查了所有调试设置,但没有任何错误。

Is anyone else getting this? 还有其他人得到这个吗?

Max 马克斯

We are experiencing the same problem with our iOS project. 我们的iOS项目遇到了同样的问题。 This seems to be a new bug in LLDB or XCode 4.6. 这似乎是LLDB或XCode 4.6中的新错误。 I just filed a bug report with Apple and would recommend doing the same. 我刚刚向Apple提交了一份错误报告,并建议您这样做。

This topic in the Apple Dev forums suggests that the issue might be related to the location of the source files inside the project's directory hierarchy: https://devforums.apple.com/message/754512 Apple Dev论坛中的这个主题表明该问题可能与项目目录层次结构中源文件的位置有关: https//devforums.apple.com/message/754512

I have found that, for us at least, this problem is to do with the way we compile. 我发现,至少对我们来说,这个问题与我们编译的方式有关。 We use the "unity" theory of compilation where the project is split into sub-projects, each with a single source file that includes all of the other source files. 我们使用编译的“统一”理论,其中项目被拆分为子项目,每个子项目都包含一个包含所有其他源文件的源文件。 Our issue seems to be that LLDB doesn't break in included cpp files. 我们的问题似乎是LLDB没有破坏包含的cpp文件。 This is due to how the compiler in-lines files. 这是由于编译器如何在线文件。

The solution is here: https://stackoverflow.com/a/17693317/683614 解决方案如下: https//stackoverflow.com/a/17693317/683614

Another stupid "user error" is what happened to me - I overrode a method in a category, but continued to put breakpoints on the code that was no longer being called. 另一个愚蠢的“用户错误”是我发生的事情 - 我覆盖了一个类别中的方法,但继续在不再被调用的代码上放置断点。 Of course it wasn't getting hit. 当然它没有被击中。 Facepalm! 捂脸!

Dear please open xcode --> product --> debug --> activate breakpoints. 亲爱的请打开xcode - >产品 - >调试 - >激活断点。

It will definitely work. 它肯定会奏效。

****** ENJOY ***** ****** 请享用 *****

在此输入图像描述

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM