使用Visual Studio Code搭建PHP调试环境
一.需要安装的软件
Visual Studio Code安装可以参照博文:
https://blog.csdn.net/qq_34195507/article/details/94558862
WAMP(包括Apache、MySQL、PHP、以及最关键的XDebug)
wampserver安装可以参照博文:
https://blog.csdn.net/qq_34195507/article/details/94851028
上面的软件安装就不在啰嗦了,可以去看我另外两篇博客都有详细的下载方法和安装步骤
二、配置WAMP-----由于调试的关键是XDebug,所以先配置XDebug,打开php.ini配置文件,搜索XDebug
注意是apache里面的配置文件:wampserver3.1.9\bin\apache\apache2.4.39\bin\php.ini
可以看到默认的xdebug远程调用是关闭的,修改如下:
将remote_enable改为on,并增加xdebug.remote_autostart = on
1 xdebug.remote_enable = on
2 xdebug.remote_autostart = on