vscode PHP无法调试怎么办

vscode PHP无法调试怎么办

vscode PHP无法调试怎么办?vscode调试php的方法

xdebug调试vscode

下载xdebug.dll扩展库

php.ini配置

 [XDebug]
 xdebug.remote_enable = 1
 xdebug.remote_autostart = 1
 zend_extension="D:\phpstudy-2018\PHPTutorial\php\php-5.5.38\ext\php_xdebug.dll"

vscode 安装插件 php debug,php xdebug

      add configuration:
           {
              "name": "Listen for XDebug",
              "type": "php",
              "request": "launch",
              "port": 9000
          },
          {
              "name": "Launch currently open script",
             "type": "php",
             "request": "launch",
             "program": "${file}",
           "cwd": "${fileDirname}",
             "port": 9000
         }

调试时有两个选项:选择"Listen for XDebug"标示自己打开浏览器,输入网址-进入断点。

选择"Launch currently open script"标示调试当前文件。

推荐学习:vscode教程

以上就是vscode PHP无法调试怎么办的详细内容,更多请关注其它相关文章!