Handy hint: easier PHP debugging Krumo ( like print_r / var_dump )


I had to do some work recently quickly debugging a PHP app. I was using print_r to quickly output various objects and arrays to find the issue.

However some of these ojects/arrays were VERY large, which made finding the information tricky. I needed something like the chrome console JS object debugger but for PHP.

Enter Krumo…


it hasn’t been updated since 2007 but it works great. Just include the krumo class and use krumo() instead of print_r()


Hope someone finds it useful.

(note: my debug page was 6MB of HTML markup after doing a few krumo() calls on large objects - page may take a while to load if you’re debugging a lot of info)


Good find. Thanks!


Thanks for sharing! I’ll give it a try.


Personally, I prefer using var_dump(), together with the excellent XDebug, especially because the latter prints out a full backtrace when a fatal error occurs (something that PHP should do out of the box, but doesn’t do).