XDebug can't connect to PHPStorm inside a vagrant box
I've just tried for many hours to get my local development system to work properly for debugging purposes.
I thought about what I changed in the last days since xdebug stopped working. I activated the log and saw that xdebug had trouble to connect to my PHPStorm
Log opened at 2018-07-31 12:39:17
I: Connecting to configured address/port: 192.168.10.1:9000.
E: Time-out connecting to client (Waited: 200 ms). :-(
Log closed at 2018-07-31 12:39:17
I found out that I wasn't able to connect with
telnet 192.168.10.1 9000
but very well with
telnet 10.0.2.2 9000
10.0.2.2 is the ip address from my local machine when I connected inside my vagrant box with the vagrant ssh command.
So I started to think about my network, I remembered that I used hyper-v a few days ago and checked my network interfaces. I saw that there was a "vEthernet" switch left from my hyper-v session. I deactivated the interface and restarted the debug listener inside of PHPStorm and et voilà: It works again:-)
Please sign in to leave a comment.