在调试过程中未触发断点。我发现这是因为代码经过优化。
Breakpoints are not being triggered during debugging. I discovered it's because of optimised code.
如何禁用优化? 我已经遍历了每个工具栏,而我能找到的最接近的选项是产品=>执行动作=>生成优化配置文件。 Xcode说,这在我在模拟器中调试时不起作用。
How can you disable optimisation? I've walked through every toolbar and the closest option that I could find is Product => Perform Action => Generate Optimisation Profile. This does not work as I am debugging in the simulator, says Xcode.
是吗可以使用模拟器并在Swift中禁用Xcode 6.1中的代码优化功能,如果是这样,我该怎么做?
Is it possible to disable code optimisation in Xcode 6.1 using the simulator and writing in Swift, and if so, how would I go about that?
解决方案:
我的问题是首先找到构建设置菜单。
My problem was finding the build settings menu in the first place.
推荐答案在Xcode中,在 Build Settings下找到您的目标,滚动到 Swift Compiler-Code Generation,然后滚动到 Optimization Level。确保选中无。
In Xcode, look under 'Build Settings' for your target, scroll to 'Swift Compiler - Code Generation' and then 'Optimization Level'. Ensure that 'None' is selected.
更多推荐
Xcode 6:如何禁用优化(快速)
发布评论