如何跟踪PHP中的代码执行? [英] How to trace code execution in PHP?

查看:233
本文介绍了如何跟踪PHP中的代码执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看PHP脚本的全部代码执行日志.像这样的东西: http://en.wikibooks.org/wiki/Ruby_Programming/Standard_Library/Tracer (由于缺乏更好的例子;请不要大火).

I would like to see a log of THE WHOLE code execution of PHP script(s). Something like this: http://en.wikibooks.org/wiki/Ruby_Programming/Standard_Library/Tracer (for lack of better example; no flame please).

有什么方法可以获取PHP中的日志吗?

Is there some way how to obtain the log in PHP?

注意::我知道我可以使用调试器,但这并不相同.

Note: I know I can use a debugger but that's not the same.

推荐答案

Xdebug绝对是您想要的,但是带有

Xdebug is definitely what you want, but with something like callgrind from the valgrind suite as well.

Zend博客文章应该为您提供一些指示: http://devzone.zend.com/1139/profiling-php-applications-with-xdebug/

Zend blog post here should give you some pointers: http://devzone.zend.com/1139/profiling-php-applications-with-xdebug/

这篇关于如何跟踪PHP中的代码执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆