Oce*_*t20 1 apache-flex compiler-construction debugging actionscript
有没有办法标记代码的某些部分,以便它们甚至不能在发布模式下编译?我知道你可以在C#中用这样的语法来做:
if #DEBUG
trace("Debug");
else
trace("Release");
Run Code Online (Sandbox Code Playgroud)
Actionscript/Flex有任何类似的功能吗?
是的,你可以使用:
CONFIG::debugging {
trace("Debug");
}
CONFIG::release {
trace("Release");
}
Run Code Online (Sandbox Code Playgroud)
使用以下编译器参数:
-define+=CONFIG::debugging,true -define+=CONFIG::release,false
Run Code Online (Sandbox Code Playgroud)
更多细节在这里.
| 归档时间: |
|
| 查看次数: |
229 次 |
| 最近记录: |