魔了 发表于 2023-5-12 23:47:52

phpstorm断点调试方法图文详解

环境:win10+phpstorm2022+phpstudy8+lnmp
1、phpinfo();查看是否安装xdebug,没有走以下流程

2、phpstudy中切换不同版本php版本,有些版本不支持xdebug(如php8.0.2),有些已经自带了(如php7.3.9)。已经自带的只需要在php.ini中调用

php.ini 配置文档

zend_extension=D:/phpstudy_pro/Extensions/php/php7.3.9nts/ext/php_xdebug.dll
xdebug.idekey=phpstorm
xdebug.remote_enable = On
xdebug.remote_host=localhost
;xdebug.remote_port 默认值为9000,这里需要跟phpstorm配置一致,下面有说明
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.auto_trace = On3、检测当前php 版本应该下载什么xdebug.dll的工具,它会提示应该下载哪个php版本,以及安装配置步骤:Xdebug: Support — Tailored Installation Instructions

4、配置phpstorm




5、配置chome



6、开始调试


刷新浏览器网页,出现以下对勾,表示配置成功

按F7,程序会一步一步往下走,碰到函数的话,会跳转到该函数。
按F8,在当前代码页一行一行的往下走,碰到函数不会跳转。
按F9,从某个断点跳到另一行处断点。

来源:https://www.jb51.net/article/282063.htm
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: phpstorm断点调试方法图文详解