优化 - 步进可能会表现得很奇怪;变量在 Xcode 9.1 中可能不可用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47302748/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:26:21  来源:igfitidea点击:

optimization - stepping may behave oddly; variables may not be available in Xcode 9.1

iosswiftxcode

提问by Sakir Sherasiya

When i put debug point in project i get this one error

当我将调试点放在项目中时,我收到了这个错误

App Name was compiled with optimization - stepping may behave oddly; variables may not be available.

App Name 是经过优化编译的 - 步进可能会表现得很奇怪;变量可能不可用。

And Also i don't get debug point and xcode not print any log.

而且我没有得到调试点,xcode 也没有打印任何日志。

If anyone know solution please share.

如果有人知道解决方案,请分享。

回答by joern

You are receiving this message because you set your target's optimization level to one of the Fastoptions.

您收到此消息是因为您将目标的优化级别设置为Fast选项之一。

Set the Optimization Levelto Nonewhile debugging to make the message go away and your break points behave normally:

设置优化级别,以None在调试,以便使邮件消失,你的破发点正常行为:

enter image description here

在此处输入图片说明

回答by One Windy

I had the same issue and I solve it adding to Apple LLVM - Custom Compiler Flags:

我有同样的问题,我解决了它添加到 Apple LLVM - 自定义编译器标志:

Other C Flags: -DRUNTIME_IL2CPP=1