Krumo is a debugging software equivalent to print_r() and var_dump(), with the advantage of collapsing array and object values so that it takes less space and let us see only what we really need from complex data.
Hikari Krumo ports it to a Wordpress plugin, so that Krumo becomes easily available in any Wordpress page. Original Krumo has a few bugs fixed and has its options available in an admin page instead of requiring krumo.ini file edited directly.
- Support & Requests
- Frequently Asked Questions
- To-do stuff
- Related Posts
- Comments (0)
- The simplicity of print_r() with the details of var_dump()
- Show any data, including its data type
- For arrays and objects, internal data are collapsed, so that it takes less space and you can expand to see only those values you really wanna see, spending much less space
- Works anywhere in Wordpress, backend and frontend
- Hide it from visitors and only those who really need to see dump be able to see it
- Automatically shows PHP file and line where dump happened, a great tool for debugging
These ScreenShots were taken in my site, dumping the very known $post object, as in:
<?php global $post; krumo($post); ?>
- Krumo as it's presented when page loads, collapsed and using very little space
- Main variable expanded, showing all object's fields
$post->post_contentwas still collapsed because it's a large text, now it was also expanded and you can see how a big string/blob of text is shown
- here you see the result of
© Copyright Hikari (http://wordpress.Hikari.ws), 2010
If you want to redistribute this software, please leave a link to this post together with it and mention me as its author
Parts of this code are provided or based on ideas and/or code written by others
Important contributors to this plugin (listed in alphabetical order):
- Krumo (http://krumo NULL.sourceforge NULL.net)
If you want to extend the plugin features, please contact me so I can add your work to my official release.
You can follow Hikari Krumo updates and older versions at Wordpress.org Plugin Directory (http://wordpress NULL.org/extend/plugins/hikari-krumo/), or you can get the last version from the direct link hikari-krumo.zip (http://downloads NULL.wordpress NULL.org/plugin/hikari-krumo NULL.zip).
There are also several ways you can show your appreciation:
- blogging about it
- linking it from your site (without using rel=nofollow)
- browsing the site sidebars
- suggesting it to your friends
- visiting other posts thru the site and adding valuable comments
- saying thanks on comments
- offering codes that add new features
- etc, use your imagination
Hikari Krumo requires at least Wordpress 2.8 and PHP5 to work.
You can use the built in installer and upgrader, or you can install the plugin manually.
- Download the zip file, upload it to your server and extract all its content to your
/wp-content/pluginsfolder. Make sure the plugin has its own folder (for exemple
- Activate the plugin through the 'Plugins' menu in WordPress admin page.
- Go to Hikari Krumo settings page and set who should see it
- That's it! Now you can use Krumo anywhere in your site, being it in a Wordpress Core file, a plugin or a theme, just by calling
krumo($data)and passing the data you wanna debug to it!
If you have to upgrade manually, simply delete
hikari-krumo folder and follow installation steps again.
I've made an article just to explain in full details which options we have to upgrade and uninstall our plugins and what happens with each option, and how it works with my plugins: Uninstalling my plugins.
If you go to plugins list page and deactivate the plugin, it's config stored in database will remain stored and won't be deleted.
If you want to fully uninstall the plugin and clean up database, go to its options page and use its uninstall feature. This feature deletes all stored options, restoring them to default (which can also be used if you want defaults restored back), and then gives you direct link to securely deactive the plugin so that no database data remains stored.
Support & Requests
If you want to request any new feature, leave a comment on this post explaining it with as many details as possible. I can't assure it will be added, but if it is viable, I like it AND have the time, I'll do my best.
If something seems to not be working and you need help, first read the FAQ and then leave a comment explaining what's happening. If you need to post a picture, please link it instead of using an img tag.
What's the difference of original Krumo to Hikari Krumo?
Full Krumo is included in the plugin, it's ported to Wordpress so that we can use Krumo anywhere inside Wordpress without having to bother of including it before the use.
Krumo is also adapted so that it's configured from a Wordpress plugin admin page instead of original krumo.ini, making it much easier to config. You can also configure who should see krumo output, so that you use it in frontend while your visitors see your site without even guessing Krumo is in place there.
Also, a few Krumo bugs I've seen were fixed.
I wanna design a new skin, will you help me?
Well I'm not webdesigner, but I can debug it and add to my plugin if you want.
Just provide me the skin files, and make sure to use schablon.com as a basis because it's the one I've tested further. Also make sure to use my plugin's files as basis, because they have some bug fixes over original ones.
- 0.02 - 08/10/2010
- First public release.
- Object private fields aren't shown, for these situations print_r() or var_dump() unfortunately are still required
Here are my ideas that I wish to implement in the future.
- Find out how to use reflection in PHP, so that object private fields can also be shown by Krumo
Thanks to all my friends that support me and thumbs me up to continue.
Thanks to everybody who use my plugins (even not donating ). Thanks to everybody that add comments to my site!
And most of all to everybody that hire me as consultant to implement custom code for their ideas!