Add support for toggling debug mode and accessor function for debug mode status flag.