PhpStorm配置xDebug

php的调试环境的配置一贯是比较纠结的,以前在zendstudio中配置了一次,破费周折(具体过程参见:http://blog.csdn.net/dannywj1371/article/details/9272565),今天在phpstorm上配置了一下,现记录一下详细过程。php

 

1.安装好phpstorm(版本7.1.3)。html

2.配置php的xdebug扩展组件。phpstorm

xdebug的安装成功与失败须要检验一下。有两种方式:ide

a.在命令行中执行 php –m 没有报错而且能够找到xdebug模块。网站

b.把phpinfo() 的信息粘贴在xdebug的向导页面中,分析成功。向导页面:http://xdebug.org/wizard.php.net

安装方法:命令行

a.修改php.ini 添加配置:debug

 

[XDebug]
; Only Zend OR (!) XDebug
zend_extension_ts="E:\xampp\php\ext\php_xdebug-2.2.3-5.2-vc9.dll"
xdebug.auto_trace=On
xdebug.collect_params=On
xdebug.collect_return=On
xdebug.trace_output_dir="e:/xampp/php/debuginfo"
xdebug.profiler_enable=On
xdebug.profiler_output_dir="e:/xampp/php/debuginfo"
xdebug.idekey=PhpStorm
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp调试

因为在zend_extension_ts配置了dll的引用,所以orm

;extension=php_xdebug-2.2.3-5.2-vc9.dll 这个配置就能够注释掉了。不然提示重复加载xdebug

PS具体xdebug的版本若是不一致,能够参考向导页面的报错信息,以及根据报错信息的建议方案进行调整。

 

3.配置phpstorm

image

 

image

 

此处的配置idekey要和php.ini中配置的一致。

 

image

 

加入断点后要点击监听xdebug按钮,才可调试。

 

 

参考网站:

http://www.cnblogs.com/jsn521/p/3399997.html
http://www.cnblogs.com/tippoint/p/3429384.html
http://micate.me/phpstorm-xdebug.note

相关文章
相关标签/搜索