how to run debug mode, save some codes
fbicirno opened this issue · comments
i need a switch that can switch 'debug code' on build.
such as:
@debug function printdebug( string txt)
print(txt)
if i ban debug in opt
'printdebug' will not build
just use an if with a global constant variable and it will be optimized away.
constant IS_DEBUG = true
function printDebug(string txt)
if IS_DEBUG
...
You could also use the isProductionBuild variable.