Skip to main content
2 of 2
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/

Need to print all the function calls Drupal makes

I need to examine all the function calls Drupal makes during it loads a page (even if there are no errors). I guess debugging software can do this but I would also like to know a way to do this without xdebug etc.

I found this link: https://drupal.stackexchange.com/questions/545/how-to-debug-drupal but I'm not sure where to put for example this code:

<?php
$bt = debug_backtrace();
foreach ($bt as $key => $value) {
  if ($key == 0) {
    continue;
  }
  unset($bt[$key]['args']);
  unset($bt[$key]['object']);
}
drupal_set_message(str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($bt, TRUE)))));
?>
jjei
  • 683
  • 1
  • 9
  • 22