Xcode 6:如何禁用优化(快速)

编程入门 行业动态 更新时间:2024-10-10 17:33:16
本文介绍了Xcode 6:如何禁用优化(快速)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在调试过程中未触发断点。我发现这是因为代码经过优化。

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?

解决方案:

  • 在文件夹图标下左窗格的项目导航器中单击您的项目名称。
  • 点击顶部菜单上的构建设置。
  • 向下滚动到 Apple LLVM 6.0-代码生成
  • 在优化级别下,选择无[-O0]
  • Click your project name in the project navigator in the left pane under the folder icon.
  • Click 'Build Settings' on the top menu.
  • Scroll down to 'Apple LLVM 6.0 - Code Generation'
  • Under 'Optimization Level' Select 'None [-O0]'
  • 我的问题是首先找到构建设置菜单。

    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:如何禁用优化(快速)

    本文发布于:2023-11-29 06:58:27,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1645675.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:快速   Xcode

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!