Xcode 7 调试模式是否有效?

Is Xcode 7 Debug Mode Working?

使用 Xcode 7 Beta 3

下面的代码无法正确输入 #if DEBUG 语句。我几乎可以肯定我处于调试模式,但出于某种原因,以下代码无法正常工作:

#if DEBUG
    btnPrintPath.title! = "PrintPath"
#else
    btnPrintPath.title! = "" // EXECUTING THIS LINE.
#endif

我的方案是这样的:

我 运行 应用 cmd + R

我是不是配置不当?

-D DEBUG 添加到 "Swift Compiler - Custom Flags" -> "Other Swift Flags"。

没有官方文档提到此功能(您可能想为此提交雷达)但我看到它在 this related answer.

中使用