I often have problems with the standard backtracing functions when working with Drupal:
debug_print_backtrace();
often seems to get lost between pages and never prints,- Drupal's objects and classes are often so big that
debug( debug_backtrace(), "Backtrace", true );
can kill my server with out of memory errors, anddebug( debug_backtrace() );
almost always fails with a "Nested dependency" recursion error.
Is there any alternative to the above approaches that can be used reliably, ideally as a drop-in function without needing to set up any framework?