move BitBase::debug to global bit_db_debug function