Skip to content
Siolon
Siolon
  • Home
  • About
  • Archives
  • Testimonials
  • Contact
Siolon

WP-Debug

Chris Poteet, October 30, 2007July 22, 2009
WP-Debug Screenshot
WP-Debug Screenshot
WebDevStudio has created WP-Devel which uses the foundation of WP-Debug and has added enhancements. I’m no longer updating WP-Debug but instead pointing to their work.

I was using my StumbleUpon, and I came across Krumo which is a PHP debugging application. It allows you to see the content of server variables, cookies, and a lot more including specified variables such as $wp_query! After a short while I had a running WordPress plugin which should be an asset for WordPress developers.

Installation

  1. Download, upload, activate.

That’s it! As long as you’re logged in you’ll see the expandable menus in the footer of your page (nothing is shown to your visitors). It does rely on having the wp_footer() call in your theme so ensure that’s there if you don’t see anything.

Configuration

Krumo comes with some default styles: default, blue, green, orange, and scablon.com. It is set to default which works the best with the default WordPress theme. If you would like to change it you can go to the “krumo” folder of the plugin and edit the “selected” value in the krumo.ini file (you might have to adjust the styles depending on how CSS inheritance from your theme throws things off).

[skin]
selected = "default"

I have most of the Krumo API in the plugin, but you can add/remove at your lesiure. If you want to check a variable then simply add to lines 14, but you can see on line 14 that I had to declare WordPress variables as global, because the content is outside the loop. Simply add a global variable to line 12 if needed.

global $user_ID, $wp_query, $wp;
if ( $user_ID ) {
include ('krumo/class.krumo.php');

Be sure to check the documentation for their API if need be.


Related Posts

Design WordPress debugkrumoPHPpluginPluginsWordPress

Post navigation

Previous post
Next post

Comments (21)

  1. Scott Frangos says:
    November 4, 2007 at 9:03 pm

    Hi There Chris –
    This looks at a great plug-in… thank you very much. I recently ran into some slow-loading page issues for my WordPress websites and tried a bunch of things to address the issue(s) (see forum post at http://wordpress.org/support/topic/141011).

    I plan to blog about your plugin at OpenSourceWebMaster.com. Do you have a donation button for your plugin?
    – Scott

    Reply
  2. Chris Poteet says:
    November 5, 2007 at 5:11 am

    @Scott: I’m glad you liked it, and thanks for the publicity. I added a donation button above, and I also have a link for it.

    Reply
  3. GM says:
    November 17, 2007 at 10:31 pm

    Activated version wp-debug 1.0 on WP2.3.1, and get the following error at the bottom of pages.

    Fatal error: Call to undefined function: getallheaders() in /wp-content/plugins/wp-debug/krumo/class.krumo.php on line 260

    Still digging into it, but curious if you have heard of others running into this.

    Reply
  4. Chris Poteet says:
    November 17, 2007 at 11:40 pm

    @GM: If you comment that particular function on line 26 of wp-debug.php do you get any other errors? I’m guessing it’s associated with your server.

    Reply
  5. GM says:
    November 18, 2007 at 6:17 am

    Commenting out line 26 worked. What functionality am I missing with it removed?

    Reply
  6. Chris Poteet says:
    November 18, 2007 at 7:21 pm

    @GM: You’ll won’t get the PHP header information (what browser you are using, etc). Not critical.

    Reply
  7. Kaloyan K. Tsvetkov says:
    February 6, 2008 at 1:18 pm

    I am glad that you took my little project Krumo to such good use!

    Reply
  8. Chris Poteet says:
    February 6, 2008 at 3:10 pm

    @Kaloyan: Thank you for making it possible!

    Reply
  9. Sören says:
    April 5, 2008 at 11:23 am

    Hi Chris,

    thanks for the great plugin. I was always looking for such structured information for debugging purposes.

    I did some modifications to the plugin code and also to the krumo class itself. If you are interested in this code, I would be happy to share this.

    I did the following changes:
    – Krumo output is now also displayed on the admin pages of WordPress
    – A developer can call the debug functions itself. In this case it is assumed that she would like only to see the requested information. The predefined bunch of krumo calls are skipped in this case
    – If a developer calls the debug function itself, the output will also go to the footer of the page
    – Krumos recursion detection wasn’t acutally a recursion detection but a reference detection. This lead to more recursion warnings as necessary

    Reply
  10. Chris Poteet says:
    April 5, 2008 at 2:41 pm

    @Soren: I just sent you an e-mail. Please do share.

    Reply
  11. Vladimir says:
    April 9, 2008 at 2:21 pm

    Hello Chris,

    I am looking for a way to do debug output during ajax calls. Would your plugin allow that?

    Reply
  12. Chris Poteet says:
    April 9, 2008 at 4:00 pm

    @Vladimir: I would suggest using Firebug for that.

    Reply
  13. Vladimir says:
    April 9, 2008 at 8:03 pm

    Thanks Chris

    Do you know of a way to call firebug’s console.log from a php function?

    Reply
  14. Chris Poteet says:
    April 9, 2008 at 9:21 pm

    @Vladimir: Not with PHP that I know of. You can try FirePHP, but I’ve never gotten it to work.

    Reply
  15. Vladimir says:
    April 9, 2008 at 9:33 pm

    I am puzzling with idea to make a debug plugin that will allow real time debuging from anywhere.

    you would open a new browser window and point it to a debug server which will receive information from your plugin or whatever in realtime. Have time for that? :)

    Reply
  16. Chris Poteet says:
    April 10, 2008 at 2:14 am

    @Vladimir: Sorry, I don’t have any interest. I will however be releasing a new version of WP-Debug soon, but it still won’t address your needs.

    Reply
  17. David Edwards says:
    May 18, 2008 at 4:13 am

    Hi, I accidentally installed this on my PHP4 hosting service and found nothing in my WP install worked. All failing looking for the debug_print_backtrace() function. In your btev.php module you call this twice, but you only check for it’s existence in the first one. Fixing it was a simple matter of copying the code block from the first call (lines 1054-1065) over the second call (from line 1108).

    Reply
  18. Chris Poteet says:
    May 21, 2008 at 2:37 am

    @David: What line is this in? Is it in the Krumo class?

    Reply
  19. David Edwards says:
    May 25, 2008 at 10:34 pm

    My apologies, it’s in btev.php which is part of the bluetrait event viewer plugin, not yours.

    Reply
  20. Brett says:
    March 10, 2010 at 8:32 pm

    Running WordPress 2.9.2, I downloaded, uploaded and activated and nothing shows up… anywhere. I checked the page source, I checked the footer and nothing is showing, not even an error.

    Reply
    1. Chris Poteet says:
      March 10, 2010 at 10:21 pm

      I no longer maintain this plugin. WP-Devel has taken its place http://wordpress.org/extend/plugins/wp-devel/

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

        ©2026 Siolon | WordPress Theme by SuperbThemes