You are here

function ddebug_backtrace in Devel 5

Same name and namespace in other branches
  1. 8.3 devel.module \ddebug_backtrace()
  2. 8 devel.module \ddebug_backtrace()
  3. 8.2 devel.module \ddebug_backtrace()
  4. 6 devel.module \ddebug_backtrace()
  5. 7 devel.module \ddebug_backtrace()
  6. 4.x devel.module \ddebug_backtrace()

Print the function call stack.

File

./devel.module, line 1368

Code

function ddebug_backtrace() {
  if (user_access('access devel information')) {
    $trace = debug_backtrace();
    array_shift($trace);
    foreach ($trace as $key => $value) {
      $rich_trace[$value['function']] = $value;
    }
    if (has_krumo()) {
      print krumo($rich_trace);
    }
    else {
      dprint_r($rich_trace);
    }
  }
}