【发布时间】:2021-03-26 17:48:54
【问题描述】:
我最近安装了 Felix Becker 的 php 调试器。 无论我做什么配置设置,我的调试器都没有遇到任何问题。 以下是我的 conf 文件。
xdebug.ini
[xdebug]
; debug
xdebug.default_enable = $value
xdebug.remote_autostart = $value
xdebug.remote_connect_back = 0
xdebug.remote_host = $value
xdebug.remote_port = $value
xdebug.remote_enable = 1
xdebug.idekey = $value
; profiling
xdebug.profiler_enable = 0
xdebug.profiler_output_dir = /tmp
zend_extension=xdebug.so
Launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9009,
"pathMappings": {
"path/path": "$value"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9009,
"pathMappings": {
"path/path": "$value"
}
}
]
}
我这里有什么遗漏吗?
【问题讨论】:
-
你的 PHP 和 Xdebug 版本是什么?
-
PHP 7.3.11 php debug by Felix Becker v1.13.0
-
谢谢,但我询问了 Xdebug 版本(在 PHP 端进行调试的实际 PHP 扩展)而不是 VSCode 扩展。我之所以问,是因为 Xdebug v3 使用与 v2 不同的配置参数——也许这里也是如此。
-
Xdebug v3.0.1,作者 Derick Rethans
-
"Xdebug v3.0.1, by Derick Rethans" 在这种情况下,请通过xdebug.org/docs/upgrade_guide 并更新您的 Xdebug 配置。您正在使用 Xdebug v2 配置参数,v3 使用不同的配置参数。您当前的设置,在 v3 中几乎所有设置都不起作用。
标签: php visual-studio-code xdebug