php开发最强大的IDE编辑的phpstorm 2025.2配置Xdebug调试的详细教程

2025-05-29 0 53

时间:2020年8月15日10:25:47

xdebug插件安装省略,自己百度安装,win和linux环境安装方式不一样。

注意和php版本匹配

1、phpinfo信息

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

2、php.ini配置

  1. [xdebug]
  2. zend_extension=/usr/lib64/php/modules/xdebug.so
  3. xdebug.remote_enable=1
  4. xdebug.profiler_enable=On
  5. xdebug.auto_trace=On
  6. xdebug.profiler_enable_trigger=On
  7. xdebug.profiler_output_name=cachegrind.out.%t.%p
  8. xdebug.remote_handler="dbgp"
  9. xdebug.remote_host="172.16.6.44"
  10. xdebug.remote_mode="req"
  11. xdebug.remote_port=9000
  12. xdebug.idekey="PHPSTORM"
  13. xdebug.remote_autostart=1
  14. ;xdebug.remote_connect_back=1
  15. ;Ifopenssl.cafileisnotspecifiedoriftheCAfileisnotfound,the
  16. ;directorypointedtobyopenssl.capathissearchedforasuitable
  17. ;certificate.Thisvaluemustbeacorrectlyhashedcertificatedirectory.
  18. ;MostusersshouldnotspecifyavalueforthisdirectiveasPHPwill
  19. ;attempttousetheOS-managedcertstoresinitsabsence.Ifspecified,
  20. ;thisvaluemaystillbeoverriddenonaper-streambasisviathe"capath"
  21. ;SSLstreamcontextoption.
  22. ;openssl.capath=
  23. ;LocalVariables:
  24. ;tab-width:4
  25. ;End:
  26. xdebug.var_display_max_children=10240
  27. xdebug.var_display_max_data=10240
  28. xdebug.var_display_max_depth=10240

3、当然你的xdebug.so扩展也要安装起来。

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

4、编辑器phpstorm配置

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

setting配置

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

端口和ini中配置的一样

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

本机ip配置,虚拟机的ip是192.168.99.26

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

输出窗口信息

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

代码界面输出

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

1.首先检查phpstorm的xdebug配置

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

4.开始使用断点调试

-〉开启调试(phpstrom)

1、设置断点

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

f9跳出

f8下一步

->浏览器增加开启和关闭按钮

https://www.jetbrains.com/phpstorm/marklets/

php开发最强大的IDE编辑的phpstorm 2020.2配置Xdebug调试的详细教程

-〉在代码中打断点,运行访问该页面的url

浏览器开启调试,然后刷新页面即可。

总结

到此这篇关于php开发最强大的ide编辑的phpstorm 2020.2配置xdebug调试的文章就介绍到这了,更多相关phpstorm调试配置 xdebug内容请搜索快网idc以前的文章或继续浏览下面的相关文章希望大家以后多多支持快网idc!

原文链接:https://blog.csdn.net/php_xml/article/details/108018926

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 建站教程 php开发最强大的IDE编辑的phpstorm 2025.2配置Xdebug调试的详细教程 https://www.kuaiidc.com/91082.html

相关文章

发表评论
暂无评论