event to DebugBar message

I prefer to use events, Code is less dependent
     Event::fire('debugbar.info',array($_SESSION)); Debugbar::info($_SESSION);
     Event::fire('debugbar.alert','error line 12!'); // Debugbar::alert("Error!");
         $object=new stdClass();
         $object->toto='more';
     Event::fire('debugbar.debug',$object); // Debugbar::debug($object);