xampps 配置xdebug
有时候用PHP开发程序,要对代码进行跟踪调试,方法有很多,下面记录下PHP+Xdebug的调试配置日志。
环境是:
xampps 1.8.7
php 5.5.11
Xdebug 下载到对应的PHP版本,下载地址:http://xdebug.org/download.php
目前我下载的是:xdebug 2.2.6 PHP 5.5 VC11 TS (64 bit) 下载后,重命名为:php_xdebug.dll
找开php.ini的目录,在最后加上以下配置
[xdebug]
zend_extension="..PHP扩展路径\ext\php_xdebug.dll"
xdebug.idekey="PHPSTORM"
xdebug.remote_enable = On
xdebug.remote_host = "phpstrom.com"
xdebug.remote_port = 9001
xdebug.remote_handler = "dbgp"
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.collect_assignments = 1
xdebug.collect_vars = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.show_local_vars = 1
xdebug.show_exception_trace = 0
查看phpinfo();
看有xdebug模块信息出来就是搞定了。
xdebug.auto_trace = 1;开启后可能会引发一些小问题,原来的PHP环境会出现链接被重置,把这关闭即可!
转载于:https://blog.51cto.com/happyliu/1589601