PhpStorm Xdebug Not Connecting / Breakpoints Not Hit
Workaround available Windows, macOS, Linux, Docker Updated November 14, 2026Based on 5 user reportsHow we research
Quick answer
The usual causes are a wrong client_host or port, missing path mappings, or Xdebug not in debug mode. Check port 9003, host.docker.internal and map the whole project root.
Most likely fix: Check Xdebug settings
How to fix it
Try these in order — the most common fix is first.
1. Check Xdebug settings
- Set xdebug.mode=debug and xdebug.start_with_request=yes (or trigger it)
- Set xdebug.client_port=9003 and match it under Settings | PHP | Debug
- Restart PHP or the container
Did this fix it?2. Docker and Sail: reach the host
- Set xdebug.client_host=host.docker.internal
- On Linux add an extra_hosts entry mapping host.docker.internal to host-gateway
- For Laravel Sail set XDEBUG_MODE and XDEBUG_CONFIG explicitly in docker-compose.yml
Did this fix it?3. Fix path mappings
- Map the project root to the path inside the container (often /var/www/html)
- Do not map only a subfolder
Did this fix it?4. Test the breakpoint
- Place it on a simple one-line assignment
- Enable Resolve breakpoint if it is not available on the current line in Debug settings
Did this fix it?
Symptoms
The listener is on but PhpStorm never stops at breakpoints, or it shows "Waiting for incoming connection with ide key".
Why it happens
- Xdebug 3 uses port 9003 but the IDE or php.ini still expects 9000
- xdebug.client_host cannot reach the IDE from Docker or a VM
- Path mappings missing or only partial (for example vendor not mapped)
- Breakpoint on a line with no executable code
- xdebug.mode does not include debug
This guide also covers
- phpstorm xdebug not working
- phpstorm breakpoint not hit
- phpstorm xdebug docker
- phpstorm waiting for incoming connection
Still not working?
If PhpStorm keeps failing, you're not alone. See every PhpStorm problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
VS Code Python Interpreter Not Found (VS Code)
Sublime Text Package Control Error 12029 and 12057 on Windows (Sublime Text)
IntelliJ IDEA JDK Not Found or Invalid (JetBrains IntelliJ)
Other PhpStorm errors
- PhpStorm PHP Interpreter Is Not Configured
- PhpStorm Composer and Laravel Not Working (Autocomplete, Undefined Class)
- PhpStorm Indexing Takes Forever / Stuck on Indexing
- PhpStorm Out of Memory: How to Increase Heap Size
- Why Is PhpStorm So Slow / Freezing?
- PhpStorm License Activation Error / License Not Found
- PhpStorm Plugin Incompatible After Update
- PhpStorm AI Assistant Quota Exceeded / Not Working