Version 1.5, released 2009-05-21
ZFDebug is a plugin for the Zend Framework
for PHP5. It provides useful debug information displayed in a small bar at the bottom of every page.
Prior to version 1.5 it was called Scienta ZF Debug Bar.
Time spent, memory usage and number of database queries are presented at a
glance. Additionally, included files, a listing of available view variables
and the complete SQL command of all queries are shown in separate panels
(shown configured with 2 database adapters):
The available plugins at this point are:
- Cache: Information on Zend_Cache and APC.
- Database: Full listing of SQL queries and the time for each.
- Exception: Error handling of errors and exceptions.
- File: Number and size of files included with complete list.
- Memory: Peak memory usage, memory usage of action controller and support
for custom memory measurements.
- Registry: Contents of Zend_Registry
- Time: Timing information of current request, time spent in action controller and custom timers.
Also average, min and max time for requests.
- Variables: View variables, request info and contents of $_COOKIE and $_POST
The icons used are from the excellent Silk Set by Mark James. Suggestions or bugfixes will be gratefully accepted.
Speak up in the latest blog post with comments or read the introducing blog post.
Visit the ZFDebug homepage to download and read more.
Installation & Usage
To install, place the folder 'ZFDebug' in your library path, next to the Zend
folder. Then add the following method to your bootstrap class (in ZF1.8+):
protected function _initZFDebug()
$autoloader = Zend_Loader_Autoloader::getInstance();
$options = array(
'plugins' => array('Variables',
'Database' => array('adapter' => $db),
'File' => array('basePath' => '/path/to/project'),
'Cache' => array('backend' => $cache->getBackend()),
$debug = new ZFDebug_Controller_Plugin_Debug($options);
$frontController = $this->getResource('frontController');
See the ZFDebug homepage for further documentation.
v1.5 - 2009-05-21
- Rewritten with modular plugin structure
- Time plugin shows average request time
- Registry plugin with content of Zend_Registry
- Cache plugin with Zend_Cache and APC information
- HTML plugin with W3C validation
- Memory plugin supports the
mark() method to calculate delta memory usage
- File plugin shows file count, file size
- Debug bar remembers visibility across reloads
v1.4 - 2009-04-02
- List of included files are sorted alphabetically, includes the Zend Framework and shows the total number of included files
- Cursor changed to pointer (hand) on clickable elements that are not links
- The output should be HTML4_STRICT valid
- jQuery updated to 1.3.2
- Path to jQuery configurable through the option
- Fixed static variable reference
- jQuery usage should no longer interfere with other frameworks like Prototype by using
noConflict() and the long
- Options can now be passed as a Zend_Config instance
- Custom timers
- Variables panel now include $_COOKIE and, if relevant, $_POST arrays
v1.3 - 2009-02-25
- Added option to display errors allowed by
- Resizing button to slide the panel under the left window border
v1.2 - 2009-02-18
- Added option to display exceptions and call stack
- Improved display of sliding panels
v1.1 - 2009-02-10
- Support for multiple database adapters
- Disables output on Ajax calls (via
- Added timing of current controller (postDispatch - preDispatch time)
- Only injects jQuery if not already included on the requested page
- View variables escaped via
- Optional sorting of view variables
- NULL view variables displayed as such
v1.0 - 2009-01-07