Home  >  Article  >  Backend Development  >  PHP XDebug扩充

PHP XDebug扩充

WBOY
WBOYOriginal
2016-06-13 13:13:19613browse

PHP XDebug扩展

XDebug 是一个 php 代码的调试工具, 对程序员调试程序有很大的帮助。很多PHP程序员调试习惯使用echo、print_r()、var_dump()、printf()等,但是代码写好了,能运行了,不代表它的质量就过关了。有时候代码没有明显的编写错误,没有显示任何错误信息(如error、warning、notice等),但是这不表明代码就是正确无误的。有时候可能某段代码执行时间过长,占用内存过多以致于影响整个系统的效率,我们没有办法直接看出来是哪部份代码出了问题。这时候我们希望把代码的每个阶段的运行情况都监控起来,XDebug就可以为你做这些事情。更重要的是做为一个开发者,也应该要养成使用调试工具的习惯,这样可以提高开发效率和质量。

XDebug的安装,我自己试过了,挺简单,不懂得可以找我,呵呵。
以下提供几个参考链接大家也可以自己学着安装。
Xdebug安装
http://www.phpq.net/tutorial/xdebug-install.html

Xdebug使用
http://www.phpq.net/tutorial/xdebug-use.html

Xdebug配置
http://www.phpq.net/tutorial/xdebug-config.html

Xdebug调试
http://www.phpq.net/tutorial/xdebug-debug.html

WinCacheGrind工具---BUG日志可视化工具
http://www.phpq.net/tutorial/xdebug-wincachegrind.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn