Is there a way to mark certain parts of code so that they don’t even 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:
using the following compiler arguments:
More details is here.