make debug a runtime parameter
Use the same type for debug as other flags