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"标示调试当前文件。

相关文章:

  • 2021-04-14
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-11-18
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2021-10-16
  • 2021-08-17
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
相关资源
相似解决方案