安装环境是phpstudy最新版本,php版本为:php7.3.4nts,系统版本为:win10
1、下载xdebug插件
https://xdebug.org/download,下载php7.3 vc15版本,开始现在的是php7.3vc15ts版本,但是配置完成后,系统总是报错如下:
Failed loading D:\phpStudy\php\php-5.6.27-nts\ext\php_xdebug.dll
2、配置php.ini文件如下
[Xdebug]
zend_extension=D:\phpstudy\Extensions\php\php7.3.4nts\ext\php_xdebug-3.0.2-7.3-vc15-nts-x86_64.dll
;是否开启自动跟踪
xdebug.auto_trace= On
;是否开启异常跟踪
xdebug.show_exception_trace= On
;是否开启远程调试自动启动
;xdebug.remote_autostart= off
xdebug.remote_autostart= 1
;是否开启远程调试
;xdebug.remote_enable = On
xdebug.remote_enable= On
;允许调试的客户端IP
;xdebug.remote_host = localhost
;xdebug.remote_host=192.168.1.71
;xdebug.remote_host=127.0.0.1
xdebug.remote_host = localhost
; xdebug.remote_host是xdebug 远程调试时要连接的主机地址,我们用本机开发所以填“localhost”就可以了,假如你的开发环境是在远程的比如,在vagrant 的虚机里,你需要能让 Vagrant 虚拟机中的 Xdebug 连接上你本地,地址也许是填“192.168.33.1”(注意这块,很容易被误导)**
;远程调试的端口(默认9000)
;xdebug.remote_port = 9100
xdebug.remote_port=9027
;调试插件dbgp
xdebug.remote_handler=dbgp
;是否收集变量,phpstudy默认关闭
xdebug.collect_vars= On
;是否收集返回值,phpstudy默认关闭
xdebug.collect_return= On
;是否收集参数,phpstudy默认关闭
xdebug.collect_params= On
;是否开启调试内容,phpstudy默认关闭
xdebug.profiler_enable=On
;跟踪输出路径
xdebug.trace_output_dir=“D:\phpstudy\temp”
;调试输出路径
xdebug.profiler_output_dir=“D:\phpstudy\temp”
xdebug.idekey=“PHPSTORM”
3、phpstorm配置如下