VSCode 添加 PHP debug 调试

1. 打印phpinfo();查看php信息,下载对应版本的xdebug

 2. 下载 xdebug https://xdebug.org/download.php

 3. 配置php.ini 中的 xdebug

 

 开启远程调试;

 配置端口;

xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_port = 9001

4. vSCode中安装xdebug

 

5. 配置 launch.json

 这里要与php.ini 中的一致.

5. F5 调试,浏览器访问要调试的文件

 end...

原文地址:https://www.cnblogs.com/sener/p/15598406.html