VS Code 调试 PHP有关配置

 一、安装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"内设置断点,浏览器访问

成功进入!!

 

 

posted @ 2017-06-07 12:12  灰兔子  阅读(6243)  评论(1编辑  收藏  举报