0
点赞
收藏
分享

微信扫一扫

VScode 安装PHPdebug新版Xdebug3.0

安装​​vscode​​​插件 ​​PHP Debug​​(ctrl+shift+x)

进入Xdebug ​​官网​​

安装哪个版本

可以本地浏览器​​http://127.0.0.1/?phpinfo=-1​

复制整个页面内容(ctrl+a、ctrl+c)

进入​​Xdebug帮助页面​​,粘贴刚才的内容进去;

下载安装

VScode 安装PHPdebug新版Xdebug3.0_下载安装

配置php.ini

因为Xdebug 2和3.* 不太一样,配置文件需要更新

; XDEBUG Extension 3.0
zend_extension = xdebug
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.port=9003

VScode 配置

setting.json l里面添加debug路径

"php.debug.executablePath": "c:\\wamp\\bin\\php\\php7.3.21\\php.exe",

进入debug设置(ctrl+shift+d),点击设置 生成默认的 配置;

VScode 安装PHPdebug新版Xdebug3.0_下载安装_02

{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9003
}
]
}

重启wamp即可;



你要保守你心,胜过保守一切。

作者:​​刘俊涛的博客​​​


举报

相关推荐

0 条评论