• VScode 安装PHPdebug新版Xdebug3.0


    安装vscode插件 PHP Debug(ctrl+shift+x)

    进入Xdebug 官网

    安装哪个版本

    可以本地浏览器http://127.0.0.1/?phpinfo=-1

    复制整个页面内容(ctrl+a、ctrl+c)

    进入Xdebug帮助页面,粘贴刚才的内容进去;

    下载安装

    image-20220627185919167

    配置php.ini

    因为Xdebug 2和3.* 不太一样,配置文件需要更新

    ; XDEBUG Extension 3.0
     zend_extension = xdebug
     xdebug.mode=debug
     xdebug.start_with_request=yes
     xdebug.client_host=127.0.0.1
     xdebug.port=9003
    

    VScode 配置

    setting.json l里面添加debug路径

    "php.debug.executablePath": "c:\\wamp\\bin\\php\\php7.3.21\\php.exe",
    

    进入debug设置(ctrl+shift+d),点击设置 生成默认的 配置;

    image-20220627190137725

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Listen for XDebug",
                "type": "php",
                "request": "launch",
                "port": 9003
            },
            {
                "name": "Launch currently open script",
                "type": "php",
                "request": "launch",
                "program": "${file}",
                "cwd": "${fileDirname}",
                "port": 9003
            } 
        ]
    }
    

    重启wamp即可;

    文章来源:刘俊涛的博客 欢迎关注公众号、留言、评论,一起学习。


    若有帮助到您,欢迎捐赠支持,您的支持是对我坚持最好的肯定(_)

  • 相关阅读:
    yii分页
    ajax分页
    批删,全选
    网站开发的愿景
    margin collapse 坍塌
    URI URL URN
    Servlet
    Http请求
    进程间通信
    网络编程
  • 原文地址:https://www.cnblogs.com/lovebing/p/16417240.html
Copyright © 2020-2023  润新知