- Open
launch.json
- Write the following configuration
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000
},
- Launch "Listen for Xdebug"
- Launch "Listen for Xdebug" (a second time, without stopping the previous one)
- Notice it fails with
EADDRINUSE [...]::9003
OS Also reports listening on :9003
❯ ss -ltnp | grep -w ':9000'
❯ ss -ltnp | grep -w ':9003'
LISTEN 0 511 *:9003 *:* users:(("code",pid=423773,fd=26))
Additional context:
- Extension Version 1.40.1
- VS Code version: 1.119.0
- OS: Ubuntu 24.04.4 LTS
Note that I'm trying to use this extension with Xdebug2, I can also confirm there that it is not connecting (note that 172.20.0.1 is my host ip from my docker container):
[100] Log opened at 2026-05-12 15:56:38
[100] I: Connecting to configured address/port: 172.20.0.1:9000.
[100] W: Creating socket for '172.20.0.1:9000', poll success, but error: Operation now in progress (29).
[100] E: Could not connect to client. :-(
[100] Log closed at 2026-05-12 15:56:38
But if I set xdebug.remote_port=9003 it "connects" (I have other issues after related to path mapping):
[100] Log opened at 2026-05-12 15:58:23
[100] I: Connecting to configured address/port: 172.20.0.1:9003.
[100] I: Connected to client. :-)
launch.json{ "name": "Listen for Xdebug", "type": "php", "request": "launch", "port": 9000 },EADDRINUSE [...]::9003OS Also reports listening on
:9003Additional context:
Note that I'm trying to use this extension with Xdebug2, I can also confirm there that it is not connecting (note that
172.20.0.1is my host ip from my docker container):But if I set
xdebug.remote_port=9003it "connects" (I have other issues after related to path mapping):