Is there a way to mark certain parts of code so that they don't ev开发者_如何转开发en get compiled in release mode? I know you can do it in C# with syntax like this:
if #DEBUG
trace("Debug");
else
trace("Release");
Does Actionscript/Flex have any similar feature?
Yes, you can use:
CONFIG::debugging {
trace("Debug");
}
CONFIG::release {
trace("Release");
}
using the following compiler arguments:
-define+=CONFIG::debugging,true -define+=CONFIG::release,false
More details is here.
精彩评论