PHP - xdebug 调试工具安装与使用详情

PHP - xdebug 调试工具安装与使用详情

工欲善其事必先利其器,学习一门新语言,调试器的使用必不可少,本文分享一下PHP调试器的使用。

PHP目前有两种流行的调试器,

Xdebug
Zend Debugger
我在学习和研究过程中,发现网上的各种信息过于凌乱,感到痛苦,影响理解和使用。今天我以Xdebug为例,先解释其基本的工作原理,再说明生产过程中如何使用,希望能带给大家清晰易懂的知识。

Xdebug
Xdebug是一个PHP扩展,它采用DBGp协议,提供了对PHP进行Debugging和Profiling的能力。

Debug信息包含:

stack and function traces in error messages with:

full parameter display for user defined functions
function name, file name and line indications
support for member functions
memory allocation
protection for infinite recursions
此外,Xdebug还提供以下功能:

profiling information for PHP scripts
code coverage analysis
capabilities to debug your scripts interactively with a debugger front-end
今天只讨论Debug,其它功能

猜你喜欢

转载自blog.csdn.net/lang363/article/details/115902115
今日推荐