vscode调试php

  1. xdebug调试vscode
    1. 下载xdebug.dll扩展库
    2. php.ini配置
      1.   
        1 [XDebug]
        2 xdebug.remote_enable = 1
        3 xdebug.remote_autostart = 1
        4 zend_extension="D:\phpstudy-2018\PHPTutorial\php\php-5.5.38\ext\php_xdebug.dll"

         

    3. vscode 安装插件 php debug,php xdebug 
      1.   
         1       add configuration:
         2          {
         3             "name": "Listen for XDebug",
         4             "type": "php",
         5             "request": "launch",
         6             "port": 9000
         7         },
         8         {
         9             "name": "Launch currently open script",
        10             "type": "php",
        11             "request": "launch",
        12             "program": "${file}",
        13             "cwd": "${fileDirname}",
        14             "port": 9000
        15         }

         

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

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

posted @ 2019-07-10 17:55  blogliang  阅读(1875)  评论(0编辑  收藏  举报