add debug/diebug global functions