There is: D_Optimized https://dlang.org/spec/version.html#predefined-versions But nothing for debug info. I'm afraid I think you'll just have to use a version (unless you want to add it).