How to set PHPStorm to use IPV6 with xDebug
Hi,
The OS of my computer is the last release of Windows 10.
I would like to use xDebug with PHPStorm, z-Wamp and Firefox.
xDebug is defined like this in PHP.Ini:
[XDebug]
xdebug.idekey=PHPSTORM
xdebug.default_enable=on
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_connect_back=on
xdebug.remote_autostart=on
xdebug.remote_log=indicate a local xdebug.log file
The settings about xDebug are the following:
Language & Frameworks/PHP/Debug/Debug port: 9001
Language & Frameworks/PHP/Debug/DBGp proxy/IDE key: PHPSTORM
Language & Frameworks/PHP/Debug/DBGp proxy/Host: localhost
Language & Frameworks/PHP/Debug/DBGp proxy/Port: 9001
I defined a configuration as following:
PHP Web page/Server: my server
my server/Host: localhost
my server/Port: 80
my server/Debugger: Xdebug I have this:
I also installed xDebug Ext on Firefox.
Then in PHPStorm I click on the button to start listening for PHP Debug Connections I have this:
When I run netstat -anob -p tcp
TCP 0.0.0.0:9001 0.0.0.0:0 LISTENING XXXXX
[phpstorm64.exe]
When I run netstat -anob -p tcpv6
there is no line with phpstorm64.exe
When to debug I make sure xDebug Ext is enabled and when I refresh the page I have this from xDebug:
Log opened at YYYY-YY-YY YY:YY:YY
I: Checking remote connect back address.
I: Remote address found, connecting to ::1:9001.
E: Could not connect to client. :-(
Log closed at ZZZZ-ZZ-ZZ ZZ:ZZ:ZZ
How to make PHPStorm listen to IPV6 rather that IPV4?
Regards,
Bertrand
Please sign in to leave a comment.
You don't have IPv4 preference in your logs, do you?
https://youtrack.jetbrains.com/issue/WI-30173#focus=streamItem-27-1444510.0-0
For me, PhpStorm is listening on IPv6 as well: http://prntscr.com/r1ezlm
Hi,
Thank you.
As it is proposed in the link you provided, I removed the line -Djava.net.preferIPv4Stack=true from bin/phpstorm64.vmoptions.
For information, I did this as it is recommanded here: Configuring-JVM-options-and-platform-properties.
I have the confirmation with netstat and telnet that PHPStorm is using IPV6.
Infortunately, there is a bug in PHPStorm, and xDebug is still not useble, but that is another story.
Regards,
Bertrand.
Is it something we already know about? Please share a link to the issue if it is, otherwise, please describe the bug in a bit more detail. Thank you!
I haven't noticed, but z-Wamp is neither more maintained. Also, I was working with an old version of xDebug.
I don’t know if the exception I found is one that is known, but I read in different requests that using a most recent version of xDebug was solving the problem.
I decide to change the Windows web development environment, and I am know using WAMP. Also, all the problems are solved, and I can work with PHPStorm as I want.
As the bug is for an old version of xDebug, I am not sure it is interesting to spend time to find what is wrong. However, here is the information I was able to gather: