Contributions API

Calling all Drupal developers!

Help us get this on the first page of Digg. DIGG NOW!

Modules in 6

ddebug_backtrace

Definition

ddebug_backtrace()
contributions/devel/devel.module, line 1520

Description

Print the function call stack.

Code

<?php
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);
    }
  }
}
?>