Improved the debug mode handling. It now doesn't require a recompile to
enter debug mode.