Skip to content

"port" settings does not work #1124

@homersimpsons

Description

@homersimpsons
  1. Open launch.json
  2. Write the following configuration
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9000
        },
  3. Launch "Listen for Xdebug"
  4. Launch "Listen for Xdebug" (a second time, without stopping the previous one)
  5. Notice it fails with EADDRINUSE [...]::9003
Image

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. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions