利用vscode的插件把远程连接调试php转化为本地调试php,通讯从php xdebug通讯变成vscode通讯
1.在vscode中安装插件

2.安装对应PHP版本的xdebug

xdebug版本兼容参考https://xdebug.org/docs/compat#versions
xdebug安装教程1https://blog.csdn.net/song634/article/details/80170838
xdebug安装教程2https://www.cnblogs.com/wicub/p/6226996.html
3.重启httpd
service httpd restart
4.建一个launch.json
"version": "0.2.0",
"configurations": [
{
"name": "Debug current script in console",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"externalConsole": false,
"port": 9003
},
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
5.修改php.ini
查看端口

6.调试 xdebug