I am running on:
Ubuntu v18.04.1
Visual Studio Code v1.35.1
PHP v7.2.19-0ubuntu0.18.04.1
xdebug v2.7.2
wordpress v5.2.1
I am trying to debug WordPress with visual studio code and its working, when I launch a debug session by pressing F5
it works, it stops at the break-points.
The problem is instead of launching a browser, vscode shows all the page source in the debug console and then ends the debug session.
launch.json
has the following options configured
{
// 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
}
]
}
Thankyou for reading this question. I would appreciate any help