WordPress.org

Plugin Directory

Debug My Plugin with Debug Bar

Debug your plugin with the help of Debug Bar. Puts debugging messages in the drop down Debug Bar interface.

After a trip to WordCamp I learned about a cool new utility to help tighten up my plugin development, Debug Bar. When I got back home the first thing I did was install Debug Bar. Then installed a dozen other plugins related to Debug Bar.

While many provided some very cool and very useful "inside data" that did help with my plugin development, a key feature I was looking for was missing. I wanted a simple way to add my own personal debugging output to Debug Bar. After a couple of hours of searching I decided I'd write my own.

And here it is. Now I can debug any of my plugins with ease.

Install Debug Bar.

Install Debug My Plugin.

Use the Debug My Plugin methods in my code and look at my own internal messages when I need to see what is going on.

[youtube http://youtu.be/20dOoa77_DU ]

Your Dev Helper

You "talk" to this plugin via the DebugMyPlugin global and use that to set properties or invoke methods.

This global, $GLOBALS['DebugMyPlugin'], is a named array that starts out with a single panel object called 'main'. If you want to, you can just work on this "scratchpad" for output.

This method will output a print_r dump of a variable, like a named array: $GLOBALS['DebugMyPlugin']->panels['main']->addPR('Big Array is now:',$bigArray,FILE,LINE);

This method is for simple string based messages, HTML supported: $GLOBALS['DebugMyPlugin']->panels['main']->addMessage('I Want To Say:','Hello World');

Support

Support for the plugin can be found on the CSA Website. If you have an urgent issue or want one-on-one support you can purchase premium support.

My Philosophy

I strive to create code that runs efficiently and without bugs. In my opinion, well-written plugins are few and far between. While there are plenty of plugins that look nice, far too many of those plugins, including the "cool shiny ones" have too many hidden problems. I have found that over 90% of the plugins available on the WordPress plugin directory generate dozens, if not hundreds, of warnings and errors when you turn off the "hide all the problems" settings.

These hidden problems impact memory usage, fill up disk space, and reduce performance via the typical default logging settings. While you may not see the errors on your WordPress site, they are still being tracked. The more errors, the more disk I/O, the slower the app.

During 20+ years of software development, I have found that leaving "innocuous" warnings in place tends to lead to trouble further down the road. Warnings today often become errors tomorrow. Many programming languages, PHP included, continue to tighten security and close loopholes that are typically found living near all those warning messages. Some warnings are telling you to "change this now, it will be gone tomorrow". Eventually tomorrow will come.

While my plugins may not be the prettiest on the block, I do try to make sure that all the hidden stuff you don't see is designed as well as it can be. My code is not perfect, but when I find a bug I try to fix it fast. If I create a bug I try to fix it even faster. To sum it all up, I like to write plugins that last. I hope you appreciate my work.

Rate This Plugin

Please rate this plugin! Rating the plugin, hopefully with 5 stars, helps increase the exposure on WordPress, which generates more downloads and purchases of add-ons. The more add-ons I sell the easier it is to put food on the table and give me more time to code cool new features. No ratings, no food, more hours working as the Walmart Greeter, less coolness in the plugins.

Give me a chance to address your concerns if this plugin doesn't earn 5 stars by contacting me directly or by posting in the support forum at the CSA website.

Special Thanks

Requires: 3.3 or higher
Compatible up to: 4.0.7
Last Updated: 2014-9-16
Active Installs: 500+

Ratings

4.7 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1