phpstorm+xdebug 断点环境搭建

2016-09-09  本文已影响21人  Rohn

PHP 安装 xdebug 扩展

php.ini 配置
[xdebug] zend_extension=/etc/php/extensions/xdebug.so #按照自己环境设置 xdebug.remote_enable = On xdebug.remote_handler = "dbgp" xdebug.remote_host = "localhost" xdebug.remote_port = 9010 #如果端口被占用,自行更换 xdebug.idekey = PHPSTROM

设置好后重启php-fpm,可以在phpinfo()中查看到如下信息:


xdebug in phpinfo

设置 PHPSTORM

打开phpStorm


Servers Debug port DBGp Proxy Edit Configurations add a web application

打断点, 浏览器访问就ok了。

上一篇 下一篇

猜你喜欢

热点阅读