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(' ', ' ', nl2br(htmlentities(print_r($bt, TRUE)))));
?>