2

Do any of the well-known PHP debuggers offer any method of logging stack traversal? Say I wanted to somehow store a log of every entry/exit of every class, class method, and function.

Is there any way to do this all on the server side (maybe some sort of plaintext client that could log every step-in/step-out automatically)?

Update: It looks like I would be looking for some sort of PHP-based DBGP client if working with Xdebug. The only thing I've found so far is a CLI client that I can access indirectly with PHP (assuming the PHP runtime user has access): http://candyscript.com/projects/dbgp/

4

2 回答 2

3

我认为您所追求的可以使用 XDebug 与 KCachegrind(Linux/Unix) 或 WinCachegrind(Windows) 结合来实现。

我可能误解了您的问题,但要了解 KCachegrind 可以为您做什么,请查看以下内容:( 来源:sourceforge.net替代文字

在右侧,您可以看到调用图。

于 2009-08-03T20:35:05.313 回答
1

试试PECL 上提供的xhprof ,它可以满足您的需求。

于 2010-11-07T06:38:29.003 回答