implement the debug mode.