Domanda

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.

Nessuna soluzione corretta

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top