Xdebug connection issue after upgrade
Hello,
My issue is quite straightforward now that I've tested a lot of scenario trying to understand why for one project (open in an old version of PHPStorm) xdebug was working and not for the other (opened in the newest version).
It all comes down to a connection issue.
Context :
- PHPStorm running on windows
- Project files are on the WSL2 filesystem
- Project is running in a docker container
- xdebug fully configured (was working before the upgrade)
When I open the project in PHPStorm 2023.2.1 and click on "Start listening for PHP Debug Connection"
, if I connect into the container and run nc -vz <client_host_ip> 9005
I get an answer. The container is able to connect without issue to the host machine on port 9005.
If I open the exact same project/files, same files, same container, with PHPStorm 2024.2.4, click on "Start listening for PHP Debug Connection"
and then run nc -vz <client_host_ip> 9005
, this time it just times out.
Any idea of what could have changed in the configuration that suddenly lead to the container not being able to reach the ip and port when the “listening tool” is running ? At first sight I don't see any changes in the configuration when opening with the old and new version of the IDE.
Thanks for you help,
Best regards,
Killian
Please sign in to leave a comment.
Thank you for reaching Phpstorm support,
Can you check if this happens at version 2024.3.3?
If it does, what is displayed at `netstat -anp tcp |findstr 9005` on the host OS when phpstorm is set to listen for incoming connections? Also, please double-check if port 9005/tcp is indeed configured at File | Settings | PHP | Debug
Will be waiting for your reply.
Hello,
I upgraded the 2024.2.4 version to 2024.3.3 and did the following tests with two projects, and with two different ports (9013 for one project and 9015 for the other) and both the old 2023.2.1 version and the latest 2024.3.3 version :
In all cases, after double checking the port I provided in Settings > PHP > Debug > XDebug > Debug, and after making sure I stopped and restarted the Listening for PHP Debug Connection (to make sure the provided port was used) I ran both network commands :
netstat -anp tcp |findstr <filled port>
on Windows host machine : returns a result of typeTCP 0.0.0.0:<provided port> 0.0.0.0:0 LISTENING
in all casesnc -vz <client_host_ip> <provided port>
on relevant docker container :<host machine name> [<client_host_ip>] <provided> (?) open
result when using version 2023.2.1I checked the settings of Settings > PHP > Debug and there was no difference between both versions.
Edit :
I doubt it's relevant, but I might as well list another thing I checked. I thought there could have been a difference in the PHP interpreter config between the configs I had for the new and old version of PhpStorm and that it could change the behaviour. So I tested on the new version with :
But there was again no difference,
nc -vz
is still timing out.Thank you for your reply.
When Phpstorm 2024.3.3 is already listening for debug connections, could you check in Windows itself if `telnet localhost (http://localhost) 9005` successfully confirms the port is up?
Also, please attach the output of `netstat -anbo`
Additionally, to localize the issue, could you run some simple python3 webserver (https://www.digitalocean.com/community/tutorials/python-simplehttpserver-http-server#python-http-server)(on the xdebug port you're using, 9005) on wsl and see if it's accessible from inside of the docker container?
Will be waiting for your reply.