一、安裝VS CODE 、 WampServer
二、用VS Code 打開php項目后,提示 "Cannot validate since no PHP executable is set. Use the setting 'php.validate.executablePath' to configure the PHP executable."
解決方法如下:
在“文件”-“首選項”-“設置”下添加:
三、在VSCode上安裝:PHP Debug插件:
四、安裝 XDebug
a.新建phpInfo.php文件,如圖
b.運行,CTRL+A全選,並粘貼到 https://xdebug.org/wizard.php
最后在"C:\wamp\bin\apache\apache2.4.23\bin\php.ini" 內修改為
xdebug.remote_enable = 1 xdebug.remote_autostart = 1

五、開始調試,在"C:\wamp\www\index.php"內設置斷點,瀏覽器訪問
成功進入!!