Xdebug 显示方法不存在消息
Xdebug shows method doesn't exist message
我正尝试在我的 VSCode 中为 WordPress 项目实施 Xdebug。我正在使用 XAMPP 和 PHP 7.4.15。我已经在我的电脑上安装了 Xdebug (Windows 10).
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": 9003
}
]
}
php.ini
[XDebug]
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=9003
xdebug.client_host = localhost
zend_extension="G:\xampp\php\ext\php_xdebug-3.0.3-7.4-vc15-x86_64.dll"
我已经在 VSCode 上安装了 Felix Becker 的 PHP Debug
扩展。重启了我的 XAMPP 和 VSCode 几次。
我在我的主题(当前激活)的 index.php
文件上做了几个断点。
我设置了设置Listen for xDebug (wptest)
。但是,当我 运行 调试并刷新我的 index.php 页面时,它显示以下错误:
有什么线索吗?
Xdebug 正在此处启动一个断点,可能是因为 VSCode 指示它这样做。您可以通过检查 Xdebug 日志文件中的 breakpoint_set
行来验证这一点,您可以通过在 php.ini.
中设置 xdebug.log=/tmp/xdebug.log
来创建该文件
在您上一张屏幕截图的左下角,您可以看到为“所有内容”设置了一个勾号。对于 VS Code 插件,这意味着在 *
上设置 Xdebug 断点,其中包括每个异常,包括被捕获的异常。如果您取消勾选此框,Xdebug 将不再生成断点来中断您的代码。
我正尝试在我的 VSCode 中为 WordPress 项目实施 Xdebug。我正在使用 XAMPP 和 PHP 7.4.15。我已经在我的电脑上安装了 Xdebug (Windows 10).
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": 9003
}
]
}
php.ini
[XDebug]
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=9003
xdebug.client_host = localhost
zend_extension="G:\xampp\php\ext\php_xdebug-3.0.3-7.4-vc15-x86_64.dll"
我已经在 VSCode 上安装了 Felix Becker 的 PHP Debug
扩展。重启了我的 XAMPP 和 VSCode 几次。
我在我的主题(当前激活)的 index.php
文件上做了几个断点。
我设置了设置Listen for xDebug (wptest)
。但是,当我 运行 调试并刷新我的 index.php 页面时,它显示以下错误:
有什么线索吗?
Xdebug 正在此处启动一个断点,可能是因为 VSCode 指示它这样做。您可以通过检查 Xdebug 日志文件中的 breakpoint_set
行来验证这一点,您可以通过在 php.ini.
xdebug.log=/tmp/xdebug.log
来创建该文件
在您上一张屏幕截图的左下角,您可以看到为“所有内容”设置了一个勾号。对于 VS Code 插件,这意味着在 *
上设置 Xdebug 断点,其中包括每个异常,包括被捕获的异常。如果您取消勾选此框,Xdebug 将不再生成断点来中断您的代码。