Debug Like a Boss with Debug Bar

As a WordPress developer, you often need to track down bugs. Sometimes you need to inspect SQL queries that are hitting your database. Sometimes you need to see what the value of certain a transient is, or check the values of a form post. Sound familiar?

I often take the easy route and end up dumping variable info to the screen. This is very bad! Do not do this. OK, let’s be realistic: TRY not to do this. And with the Debug Bar plugin for WordPress, you will never need to var_dump again!

What is the Debug Bar?

The Debug Bar adds a new “Debug” option to the admin bar. So when you click it, it takes you to a new “debug dashboard” that is filled with awesome info only a developer will care about. Read more about it.

What Makes It Awesome?

It is extensible! The plugin authors did not try and think of every possible debugging scenario out there. Rather, they made the plugin easily extensible so that you can create your own add-on plugin that suits your needs. I created my own called Debug Bar Screen Info which simply displays the data inside the current WP_Screen object.

Debug Bar Add-On’s

Debug Bar Add-On Description GitHub
Debug Bar Constants Debug Bar Constants adds three new panels to the Debug Bar that display the defined WP and PHP constants for the current request.
Debug Bar Post Types Debug Bar Post Types adds a new panel to the Debug Bar with detailed information about registered post types.
Debug Bar Screen Info Show screen info of the current admin page in a new tab within the debug bar.
Debug Bar Actions and Filters Addon This plugin adds two more tabs in the Debug Bar to display all the hooks(Actions and Filters) for the current request.
Debug Bar Cron Debug Bar Cron adds a new panel to Debug Bar that displays information about WP scheduled events.
Debug Bar Super Globals Displays Super Global valiables for the current request.Like $_POST, $_GET, and $_COOKIE.
Debug Bar Post Meta Very simple extention to the debug bar to get a list of post meta for the current post.
Debug Bar Transients Debug Bar Transients adds a new panel to Debug Bar that displays information about WordPress transients.
Debug Bar Console Adds a PHP/MySQL console to the debug bar

What Are You Waiting For?

Install the Debug Bar plugin and these add-on’s now, and spend less time debugging and more time writing code!