第一步 PHP安装Xdebug扩展
[xdebug]
zend_extension=xdebug.so
xdebug.idekey="PhpStorm"
xdebug.auto_trade=on
xdebug.auto_profile=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9013
xdebug.remote_autostart=on
说明 : 配置完成后 phpinfo(); 查看是否安装完成
ps : remote_port 是在phpstorm里面所需要用到的端口
第二步 配置PhpStorm
-
打开Phpstorm Files->Settings->Debug
设置图片.jpg 将上面右侧有个Debug port :9000改成我们第一步配置里面配置的端口号 9013
-
将下面图片IDE key 填上 可以打开phpinfo();查看xdebug里面有这个参数 ; host是域名访问地址; prot 就是端口名称
配置2.jpg
配置3.jpg
配置参考.jpg 然后继续配置Servers
配置4.jpg