I think you can wrap the ?debug commands in an If
What.I dont think that the code you posted would work the way you expect. The ? is a pre-comiler command, it doesnt get looked at or not looked at depending on if the IF is true or not. If you set SomeConstant to <> "DemoVerion" or = "DemoVersion" the bit between ?Debug and ? is compiled depending on if its a debug build or not, and has no baring on the if.