WordPress Debugging with the wp-pear-debug plugin


The awesome wp_pear_debug brings the power of pear_debug to WordPress. What’s that mean? It means that hundreds of system variables are at your fingertips, that your GET and POST data can be easily viewed without needing to add any special debug code, and that with just a line of code, you can output any variable, including arrays and objects, to appear in a nice little dropdown. Very handy.

The video shows it in use. I apologize for the terrible audio that goes in and out of sync and has a lot of noise – I did this on my slow old laptop with the mike built into my cheapo headset. The video is a bit disorganized, but hopefully it’s enough to show you the power of wp_pear-debug. See below the video for some useful links.

The common methods available in php_debug are listed here:

That page is surprisingly hard to find from the php_debug home page, so make a note of it.

Plugin Home Page
http://www.communitymodder.com/Released-wordpress-plugins/wp-pear-debug-wordpress-plugin.html – nice description, screenshots, and help on how to install and use the plugin.

The official WordPress.org Plugin download page

In the video, I call the dump() method using the direct invocation:
wp_pear_debug::dump($defaults, ‘Defaults1’);

Since I’m not doing much, this was simpler than creating a new object and invoking it as

$debugObject = wp_pear_debug::get();

2 Responses to “WordPress Debugging with the wp-pear-debug plugin”

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>