xcode 6.1如何禁用优化(Swift) [英] xcode 6.1 how to disable optimization (Swift)

查看:340
本文介绍了xcode 6.1如何禁用优化(Swift)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在调试期间进行步调时,兴趣点会自动上下移动。我发现这是由调试优化的代码引起的。如何禁用优化?我已经走过每个工具栏,最接近的选项是Product => Perform Action => Generate Optimization Profile。这个工作不正常,因为我正在调试模拟器,xcode说。

When stepping during debugging the line of interest jumps up and down over itself. I discovered that this is caused by debugging optimized code. How would one disable optimization? I've walked through every toolbar and the closest option that I could find is Product => Perform Action => Generate Optimization Profile. This does not work as I am debugging in the simulator, says xcode.

所以我的问题是:是否可以使用模拟器和写入功能在xcode 6.1中禁用代码优化如果是这样,我该怎么办?

So my question is: Is it possible to disable code optimization in xcode 6.1 using the simulator and writing in Swift, and if so, how would I go about that?

感谢所有

解决方案:

1.在文件夹图标左侧窗格的项目导航器中单击项目名称。
2.单击顶部菜单上的构建设置。
3.滚动到Apple LLVM 6.0 - 代码生成
4.在优化级别下选择无[-O0]

1.Click your project name in the project navigator in the left pane under the folder icon. 2.Click 'Build Settings' on the top menu. 3.Scroll down to 'Apple LLVM 6.0 - Code Generation' 4.Under 'Optimization Level' Select 'None [-O0]'

我的问题是首先找到构建设置菜单。

My problem was finding the build settings menu in the first place.

推荐答案

在Xcode中,查看目标的构建设置,滚动到Swift编译器 - 代码生成优化级别。确保选择无。

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.1如何禁用优化(Swift)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆