Krumo output with debug() When debugging I prefer using the Devel module because of the clickable Krumo output. 

However when disabling the Devel module on production unremoved calls to e.g. dsm() can cause a WSOD because of calls to undefined functions.

By using the built-in debug function this does not happen but it will miss the nice krumo output.

Is it possible to get krumo output with the debug() function / or otherwise prevent the WSOD on production sites when using devel functions?
Use a custom code and define your own debug function that uses dsm if available or debug if not:

function my_debug($data, $label = NULL, $print_r = FALSE) {
  if (function_exists('dsm')) {
    dsm($data, $label);
  }
  else {
    debug($data, $label, $print_r);
  }
}


But keep in mind that you should avoid any debug code in production.