第1步:在VSCode中安装php调试扩展打开VSCodeCtrl+Shift+X,调出VSCode扩展搜索窗口,在搜索窗口中搜索PHPDebug,点击'安装'按钮、安装(我的已经安装好了,所以没有安装按钮)在题的第二步,配置VSCode的Debug1。在settings中添加“php.validate.executablePath”项在setting.json文件中搜索php.validate.executablePath,加上php.validate.executablePath2.配置debugconfig打开调试面板,点击小齿轮,并打开launch.json文件。如果没有launch.json文件,则需要手动创建:{//使用IntelliSense了解相关属性。//悬停以查看现有属性的描述。//有关详细信息,请访问:https://go.microsoft.com/fwlink/?linkid=830387"version":"0.2.0","configurations":[{"name":"ListenforXDebug","type":"php","request":"launch","port":9000},{"name":"启动当前打开的脚本","type":"php","request":"launch","program":"${file}","cwd":"${fileDirname}","port":9000}]}第三步:在PHP中安装debug扩展,任意页面输出phpinfo();Ctrl+A将页面内容复制到https://xdebug.org/wizard.php的文本框中点击下面的Analyzemyphpinfo()output按钮得到对应的xdebug.dll文件下载xdebug.dll并把它编辑php在当前版本php目录下的zend_ext文件夹.ini中,添加xdebug的配置[XDebug]zend_extension="D:/wamp/bin/php/php7.2.14/zend_ext/php_xdebug-2.6.1-7.2-vc15-x86_64.dll"xdebug.remote_enable=1xdebug.remote_autostart=1xdebug.remote_handler=dbgpxdebug.remote_mode=reqxdebug.romote_host=localhostxdebug.mode=debugxdebug.start_with_request=yesxdebug.remote_port=9003//关键是这个端口号要和launch.json中配置的端口号对应**然后重启服务器就ok了~~总之我是这样搭配的,仅供参考~~**参考文章:https://www.cnblogs.com/xinch...
