给vscode配置php调试环境
使用工具与环境
- windows 10 64位
- vscode
- phpstudy(其他的类似
phpstudy
在php扩展中安装调试工具php xdebug

对使用的php的配置文件php.ini进行修改
打开Xdebug的远程调试,配置如下

xdebug.remote_enable=1 xdebug.remote_autostart = 1
xdebug.remote_port是调试端口,默认为9000
vscode
安装PHP Debug插件,设置php和xdebug的路径
php.validate.executablePath填写php.exe路径,php.debug.executablePath填写php_xdebug.dll的路径

打开vscode的工作目录,我选的是phpstudy的WWW目录,保证调试文件在工作目录下
开启调试,并生成调试配置文件,保证端口与php.ini中xdebug的xdebug.remote_port一致
