Only allow debug mode to be enabled at compile time instead of dynamically.

 This allows for the optimiser to remove most of the debug code when it isn't used