无法使用VS Code调试php

马蒂AB

我正在尝试使用wamp,xdebug和扩展程序调试我的php ,但是我无法使其正常工作。这是我的php.ini(C:\ wamp64 \ bin \ php \ php7.0.4 \ php.ini)的结尾:

[Xdebug]
zend_extension ="C:/wamp64/bin/php/php7.0.4/ext/php_xdebug-2.4.1-7.0-vc14-x86_64.dll"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir ="c:/wamp64/tmp"

我的launch.json(C:\ wamp64 \ www \ CubePicker.vscode \ launch.json):

{
    "version": "0.2.0",
    "configurations": [
        {
            "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
        }
    ]
}

Settings.json:

// Place your settings in this file to overwrite the default settings
{
    "emmet.syntaxProfiles": 
    {
        "php": "html"
    },

    "php.validate.executablePath": "C:/wamp64/bin/php/php7.0.4/php.exe",

}

谁能看到我做错了吗?我以VS Code启动调试器,然后通过浏览器运行网页,我认为这是正确的...?我该如何解决这个问题并使它达到我输入的断点?

需要帮助请叫我。

谢谢!

[编辑]:我进入了phpinfo(),找到了已加载的php.ini的路径,并对其进行了编辑以添加第一段代码。这不能解决问题。

[编辑]:我还在这里复制了整个phpinfo():http : //pastebin.com/4Jk5TuQj

费利克斯贝克

扩展程序的作者在这里。如自述文件所述,您需要添加

xdebug.remote_autostart = 1

到您的php.ini,因此XDebug实际上会向VS Code发出请求。

我还搜索了您的phpinfo()输出,但是没有XDebug部分。您应该在此处使用XDebug配置向导:xdebug.org/wizard.php

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章