Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port)
Xdebug has no IDE listening where it was told to connect.
Xdebug Could not connect to debugging clientStep Debug Could not connect to debugging client Meaning
The debugger runs in PHP and connects *to* your IDE. With Docker or a remote host localhost is the container, not your laptop. Xdebug 3 uses port 9003.
Common causes
- IDE not listening or wrong port (9003 vs 9000)
client_hostpoints to the container- Firewall blocks the port
- Debug mode not triggered
⚡ Quick fix
- Set
xdebug.client_host=host.docker.internal(Docker Desktop) - Use port 9003 in the IDE
- Start listening before the request
Detailed fix by platform
php.ini
xdebug.mode=debug,xdebug.start_with_request=yes,xdebug.client_host=host.docker.internal,xdebug.client_port=9003
How to diagnose
- Port — IDE listening on 9003?
- Host — Reachable from PHP?
- Mode — debug enabled?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in PHP
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 2 Dec 2026