phpstorm配置Xdebug进行调试PHP教程

发布时间:2019-08-07 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了phpstorm配置Xdebug进行调试PHP教程脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

运行环境:

PHPSTORM版本 : 8.0.1

PHP版本 : 5.6.2

xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dll

ps : php版本和xdebug版本一定要相对应

  1. PHP安装xdebug扩展

php.ini的配置,下面的配置仅供参考,路径要换成自己的!

[xdebug]

zend_extension=”D:wampphp-5.6.2-x64extphp_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 这些都有默认值,但还是建议设置下,至少知道要设置这些参数~

查看phpinfo~

phpstorm配置Xdebug进行调试PHP教程

2.PHPSTORM设置

楼主以前一直用zendstudio,刚开始用phpstorm非常蛋疼,用了一段时间后发现还挺好用的~

1.首先检查phpstorm的xdebug配置

这里的debug port要和php.ini里面的xdebug.remote_port相一致!默认是9000,
如果9000端口被占用的话,可以改成其他端口。

phpstorm配置Xdebug进行调试PHP教程

phpstorm配置Xdebug进行调试PHP教程

  1. 设置debug.

    phpstorm配置Xdebug进行调试PHP教程

phpstorm配置Xdebug进行调试PHP教程

添加本地的 web server~

www.51oPEn.pcom 是我本地的 web server~ ~

phpstorm配置Xdebug进行调试PHP教程

phpstorm配置Xdebug进行调试PHP教程

phpstorm配置Xdebug进行调试PHP教程

3.开始调试

打好第一个断点,shift + F9就可以了
打好第一个断点,选中配置的debug, 按旁边的臭虫 按钮

phpstorm配置Xdebug进行调试PHP教程

脚本宝典总结

以上是脚本宝典为你收集整理的phpstorm配置Xdebug进行调试PHP教程全部内容,希望文章能够帮你解决phpstorm配置Xdebug进行调试PHP教程所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。