문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top