I'm familiar with the debug_backtrace
function in PHP, and really find it useful. However, I have a specific, very messy case where I need to be able to do the reverse - stick a function call in somewhere and have it give me a list of every function that's called after that point until the page is completely loaded.
We do have XDebug installed, and for most projects I use it. This is a really messy codebase, though, with a lot of ajax and php code that's actually created as strings and rendered (I did NOT write this code!) and none of us have ever been successful in getting a debugger to work.
PHP has a ticks feature, which can get called at the execution of each statement.
Using the ticks feature, my answer describes a class CStatemenTracer, which write a call trace alongside the execution of your application.
Might be a starting point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With