【发布时间】:2019-11-03 19:24:26
【问题描述】:
我正在运行:
Ubuntu v18.04.1
Visual Studio 代码 v1.35.1
PHP v7.2.19-0ubuntu0.18.04.1
xdebug v2.7.2
wordpress v5.2.1
我正在尝试使用 Visual Studio 代码及其工作来调试 WordPress,当我通过按 F5它启动调试会话时,它会在断点处停止。
问题是vscode没有启动浏览器,而是在调试控制台中显示所有页面源,然后结束调试会话。
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": 9000,
"program":"${workspaceRoot}/index.php",
"pathMappings": {
"/var/www/html/wordpress": "${workspaceRoot}"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
感谢您阅读此问题。我会很感激任何帮助
【问题讨论】:
标签: php wordpress visual-studio-code vscode-settings vscode-debugger