XdebugXdebug是一个开放源代码的PHP程序调试器(即一个Debug工具),可以用来跟踪,调试和分析PHP程序的运行状况。
1.打开cmd,执行如下命令:
3.分析完成后,会跳转到详细的安装步骤页面。
就可以下载合适版本的xdebug,并按照安装方法安装了。
Instructions
(1) Download php_xdebug-2.2.1-5.3-vc9.dll
(2) Move the downloaded file to "C:\Program Files\VertrigoServ\php\ext"
(3) Edit C:\Program Files\VertrigoServ\Php\php.ini and add the line
zend_extension = "C:\Program Files\VertrigoServ\php\ext\php_xdebug-2.2.1-5.3-vc9.dll"
4.在cmd中输入:
1.打开cmd,执行如下命令:
php.exe -i > phpinfo.txt
2.打开phpinfo.txt,将文件中的内容复制粘贴到 http://xdebug.org/wizard.php 中,点击分析PHP信息
3.分析完成后,会跳转到详细的安装步骤页面。
就可以下载合适版本的xdebug,并按照安装方法安装了。
Instructions
(1) Download php_xdebug-2.2.1-5.3-vc9.dll
(2) Move the downloaded file to "C:\Program Files\VertrigoServ\php\ext"
(3) Edit C:\Program Files\VertrigoServ\Php\php.ini and add the line
zend_extension = "C:\Program Files\VertrigoServ\php\ext\php_xdebug-2.2.1-5.3-vc9.dll"
4.在cmd中输入:
php.exe -v
如果出现类似下面的信息,说明xdebug已经安装成功了。
PHP 5.3.13 (cli) (built: May 8 2012 18:50:09)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
如用NetBean进行调试,php.ini中还需要添加如下配置
[xdebug]
xdebug.default_enable = On
xdebug.remote_enable=true
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000