Search Krumo module

When I first started working with Drupal I was overwhelmed with the extremely large arrays it produces. In the beginning I used print_r() and var_dump() to get information out of those arrays. You might know that finding things in there is hard, but getting the correct path to the element deep in the array is almost undoable.

And since I wasn’t so familiar with Drupal yet, I wrote a simple JavaScript solution that worked pretty good.

Enough introduction

So, enough introduction, what does it do? Search Krumo kicks in when someone uses a debug function from the Devel module (dpm(), kpr(), and more). A default krumo output will look something like this.

Krumo output using a debug function like dpm()

Search Krumo adds a search form using JavaScript just before the krumo output. The query you type in the form is used to search through the krumo output. It will match both keys and values. It tries to find strings that contain the query, it does not search for exact matches.

The module also adds a "Copy path" functionality which enables a developer to copy the exact path to the element. For example you would be able to copy the following, instead of typing it all:

$variables['page']['sidebar_first']['system_navigation']['#5']->value['safe']

You’ll be amazed at how much time this saves you each day.

Search Krumo in action

Give it a spin

Take a look at the module on Drupal.org and join the other 13000+ developers who downloaded the module. Also check out this video that shows what Search Krumo can do.

Let me know if you like the module. If you have any ideas about a Drupal 8 version for Kint, you can create an issue on the project page.

 

Search Krumo nominated for an award

The Dutch Drupal community called the Splash Awards into life and Search Krumo is one of the nominees in the section 'Modules'. Awesome!

#4