Debug mode switch