spot_imgspot_img

Search Krumo–Seconds (if not Minutes) Off your Day

In this post I’m assuming you’ve used the Drupal Devel module and Krumo to inspect or debug your arrays using dpm() in a more user-friendly manner than printr() or vardump().

If you have not used Devel and regularly debug Drupal arrays, stop everything you’re doing and check it out. The Search Krumo module adds a search field to Krumo which allows you to enter a key or value and then tells you how many times that value is contained in the array and also opens the applicable keys and highlights the value you are looking for.

Once you have found the value you are looking for Search Krumo lets you copy the path, which is a nice time saver for arrays with many keys. However when using dpm(), be sure to notice that the variable you are inspecting is replaced by $var in the copied path. So if you dpm($vars[‘node’]) or dpm($form), Search Krumo will convert that variable to $var in the copied path. This can be easily overcome by using sdpm() instead of dpm().

This is a simple module to get up and going. There is no configuration needed, and everything you need to know to get started is covered on the Search Krumo project page. All in all this module is a great time saver, and one I welcome into my workflow.

My Google+ Account

Get in Touch

spot_imgspot_img
spot_img

Get in Touch

[td_block_social_counter facebook="tagdiv" style="style6 td-social-boxed" open_in_new_window="y" f_counters_font_family="394" f_network_font_family="891" f_counters_font_size="eyJhbGwiOiIxNCIsImxhbmRzY2FwZSI6IjEzIiwicG9ydHJhaXQiOiIxMiJ9" f_network_font_size="eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjExIiwicG9ydHJhaXQiOiI5In0=" counter_color="#ffffff" counter_color_h="#ffffff" network_color="#ffffff" network_color_h="#ffffff" tdc_css="eyJsYW5kc2NhcGUiOnsibWFyZ2luLWJvdHRvbSI6IjMwIiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGVfbWF4X3dpZHRoIjoxMTQwLCJsYW5kc2NhcGVfbWluX3dpZHRoIjoxMDE5LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMjAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3NjgsInBob25lIjp7Im1hcmdpbi1ib3R0b20iOiI0MCIsImRpc3BsYXkiOiIifSwicGhvbmVfbWF4X3dpZHRoIjo3NjcsImFsbCI6eyJtYXJnaW4tYm90dG9tIjoiNDAiLCJkaXNwbGF5IjoiIn19" twitter="tagdivofficial" youtube="tagdiv"]

Latest Posts