phpstrom配置xdebug的坑

1.echo phpinfo(),把html源码放到https://xdebug.org/wizard网址中,查找对应的xdebug版本,下载xdebug

2.php.ini修改

[XDebug]
zend_extension="D:\sofe\xampp\php\ext\php_xdebug-2.6.1-7.2-vc15.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000 #要和phpstrom的配置一样
xdebug.idekey="PHPSTORM"

3.phpstorm设置xdebug,查找debug即可phpstrom配置xdebug的坑

4.phpstrom设置servers

phpstrom配置xdebug的坑

 

4.Run->Edit Configuration

phpstrom配置xdebug的坑

 

5.启动debug,先按1再按2

phpstrom配置xdebug的坑

6.进入debug

phpstrom配置xdebug的坑

 

7.划重点

如果点断点的一步直接结束了,请换低版本的xdebug扩展。原来用2.9.6版本点下一步直接断开,换成2.6.1版本的xdebug即可。

PS 我从2.9切到2.8也不行,最后直接切到2.6的版本,有点坑!!!!