Introducing Debug Bar
January 5, 2011 32 Comments
One of the features being introduced in the upcoming WordPress 3.1 release is the new Admin Bar. This is designed to make it easier to get access to the more common administration area tools from the front end of your site but also introduces the possibility to easily integrate extra debugging features into your site for use in testing environments or production environments to help track down things like slow queries, PHP notices and warnings, and usage of deprecated functions.
During the development and RC phase for WordPress 3.1 some of the core development team have worked on building a plugin which adds these debugging features to any site running WordPress 3.1 or later. The plugin started out with a very basic feature set just including MySQL query debugging information and statistics from the installed object cache based on the code that is used on WordPress.com. Overtime we have added reporting of PHP notices and warnings, Logging of calls to the things that are deprecated (code derived from the Log Deprecated Notices plugin by Core Developer Andrew Nacin) and information about the WordPress Query being run as well as how the current request has been parsed by the WordPress rewrite engine.
The plugin requires WordPress 3.1 as it hooks into the new Admin Bar and I’m sure will be of great use to all WordPress core, plugin, and theme developers.
By default the MySQL queries and PHP Notices / Warnings tabs are not displayed. If you enable MySQL query recording with the
SAVEQUERIES define in your
wp-config.php then the queries tab will show. If you enable
WP_DEBUG in your
wp-config.php then the PHP Notices / Warnings tab will show.
Here are some screenshots of the plugins different tabs:
You can find the plugin in WordPress.org Extend here: http://wordpress.org/extend/plugins/debug-bar/
Is there something else you think this plugin could provide debugging information on?