make debug state global