运行环境:
PHPSTORM版本 : 2019
PHP版本 : 5.6.2
xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dll
xdebug下载地址
ps : php版本和xdebug版本一定要相对应 注意nts版本就一定要找nts版本的dll,beta,alpha版本我个人测试是不行,下稳定本的吧
- PHP安装xdebug扩展
php.ini的配置,下面的配置仅供参考,路径要换成自己的!
[xdebug]
zend_extension=“D:\wamp\php-5.6.2-x64\ext\php_xdebug-2.2.5-5.6-vc11-x86_64.dll”
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
ps : remote_handler 、remote_host、remote_port 这些都有默认值,但还是建议设置下,至少知道要设置这些参数~
【或者使用PHPstudy:其他选项菜单/PHP扩展设置/PHP扩展/XDEBUG打上对钩】
2.PHPSTORM设置
1.首先检查phpstorm的xdebug配置
这里的debug port要和php.ini里面的xdebug.remote_port相一致!默认是9000,如果9000端口被占用的话,可以改成其他端口。
phpstorm配置
客户端调试,打开phpStorm,进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填localhost,host填localhost,

本文介绍了如何在PHPStorm 2019版本中配置xdebug进行断点调试,包括PHP和xdebug的版本对应、php.ini的xdebug配置、PHPSTORM的调试服务器与XDebug设置,以及如何开始调试。
最低0.47元/天 解锁文章
707





