Zfdebug

Original author: Joakim Nygård
  • Transfer
ZFDebug is a plugin for the Zend Framework. It contains useful debugging information in a small panel at the bottom of each page. Prior to version 1.5, it was called Scienta ZF Debug Bar.

image

Time, memory and the number of database queries are visible at a glance. In addition, there is information about the processed (included) files, the list of available variable templates (view) and SQL queries are displayed in a separate panel (in the figure, the database is configured with 2 adapters).

Existing plugins

  • Cache : Information about Zend_Cache and APK.
  • Database : A complete list of SQL queries and the time for each of them.
  • Exception : Information about errors and exceptions.
  • File : number and size of files processed by PHP.
  • HTML : Number of external styles and javascripts. Confirmation link with W3C.
  • Memory : The maximum size of the used memory, the memory used in the controller of actions and support of the user measurement of memory.
  • Registry : Zend_Registry Content
  • Time : The execution time of the current request, the execution time of the action in the controller, and user timers. In addition, the average, minimum and maximum time for requests.
  • Variables : A list of template variables, request data, and the contents of $ _COOKIE and $ _POST

Installation and use


Place the ZFDebug directory in the directory specified in include_path. Then add the following method to load your class (ZF 1.8 +):

protected function _initZFDebug()
{
  $autoloader = Zend_Loader_Autoloader::getInstance();
  $autoloader->registerNamespace('ZFDebug');

  $options = array(
    'plugins' => array('Variables',
              'Database' => array('adapter' => $db),
              'File' => array('basePath' => '/path/to/project'),
              'Memory',
              'Time',
              'Registry',
              'Cache' => array('backend' => $cache->getBackend()),
              'Exception')
  );
  $debug = new ZFDebug_Controller_Plugin_Debug($options);

  $this->bootstrap('frontController');
  $frontController = $this->getResource('frontController');
  $frontController->registerPlugin($debug);
}

* This source code was highlighted with Source Code Highlighter.


Learn more on the project page: zfdebug.googlecode.com

Also popular now: