Goal
Debug with PHP Debug, Xdebug and VSCodium.
Problem
VSCode doesn't start debugging. When I click Start Debugging the blue line under the debugging control buttons appears and moves for a few seconds and then the control buttons disappear. Same when I press the green "Run" button
Also on the left side, where "variables", "watch" and "stack" are shown nothing appears.
Description
I have no experience with the VSCodium debugging options. I used a couple of tutorials (1, 2, 3, videos and tried certainly the proposal from the VSCode PHP Debug extension site (which I use).
I'm using Codium (VSCode without MS) on a Linux Mint 20 machine. PHP 7.4 and Xdebug are installed via Linux Synaptic Package Manager. Of course the Xdebug helper in Firefox is enabled, breakpoints are set and I tried it in different projects. I tried a few things in the php.ini. That's how it looks at the moment:
[XDebug]
xdebug.remote_enable = 1
; xdebug.remote_autostart = 1
; xdebug.remote_connect_back = 1
Xdebug itself is loaded via the /etc/php/7.4/cli/conf.d/20-xdebug.ini and in PhpStorm it works like expected but not in VSCodium.
That's the standard launch.json, which is saved in the .vscode folder in the project root:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Here is a part of my phpinfo() output:
And the xdebug part:
And here the xdebug log when i try it with VSCodium:
[5625] Log opened at 2020-10-04 10:05:20
[5625] I: Connecting to configured address/port: localhost:9000.
[5625] W: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (29).
[5625] E: Could not connect to client. :-(
[5625] Log closed at 2020-10-04 10:05:20
My guess is, that there is a basic VSCodium debugging thing, I didn't enabled or so. But I don't know, what it could be. Maybe somebody has an idea?




phpinfo()output captured in the same way you are trying to debug (as it may be different for Web page debug and CLI -- it's very common to have different php.ini configs used for CLI and web server on Linux and Mac).localhost:9000(port TCP 9000 on the same PC) .. but something prevents from connecting. Is VSCode already listening on that port? After you click on Debug in VSCode, check withnetstator similar tool what program is listening on TCP 9000. It has to be VSCode (as it's Xdebug that connects to IDE and not other way around). I'm not using VSCode myself (PhpStorm user) so cannot say what you may be missing from VSCode side of things.