How to use sdpm() or dpm()? Almost everywhere I search I find the following example for using dpm() or sdpm() with the Devel and the Search Krumo modules:

Paste the following code in your theme's template.php file, save, and clear cache.
function foo_form_alter(&amp;$form, $form_state, $form_id) {
  if ($form_id == 'search_block_form') {
    sdpm($form);
  }
}


This is working fine.
But how can I see the other components, like Menu and its components or any block?
I tried following for menu but it is not working.
function mymodule_menu_link_alter(&amp;$item, $menu) {
   sdpm($menu);
}
hook_menu_link_alter() accepts only one argument in Drupal 7. That's why your code isn't working. 

Try the following:

function YOURMODULE_menu_link_alter(&amp;$item) {
  if ($item['menu_name'] == 'YOUR_MENU') {
    dpm($item);
  }
}


I have wrapped it in an if check, since otherwise it would run dpm for all menu links on a page and depending on the amount of links it may cause memory overflow or timeout.