Validate Debugger Configuration on Web Server fails on localhost:8000 (PHP Xdebug)
I'm getting the `Connection refused` error when trying to validate debugger configuration.
Is there settings I have to do to Xdebug?
Current config:
Please sign in to leave a comment.
I notice there an error in the console. Am running the server from cli btw, `php -S localhost:8000`
PHP error encountered: `There was a problem sending 178 bytes on socket 8: Broken pipe`
Changed Xdebug port to 9001 and now the breakpoint works. Validate Debugger still throws `Connection refused` error though.
ref: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000041390/comments/360000047450
If you have e.g. index.php at the root of your project, are you able to access localhost:8000/index.php from the browser?
Yup, I can access both `localhost:8000` and `localhost:8000/index.php` just fine from the browser.
Was trying to run the Validate Debugger cause the breakpoint wasn't breaking.
Managed to get the breakpoints breaking after changing Xdebug port to 9001 and making sure Chrome Debugger tool is set to PHPSTORM.
Validate Debugger is still throwing connection refused though. Not sure what's happening under the hood but I'll just leave it as it is for now.
Hi,
I have the same problem, have you found a solution?
Thank you
Patrick Lamatiere, connection refused means that the server is not running on this host:port pair. The only variable element there is the host, there's a chance that in PhpStorm localhost is being resolved to the IPv6 address, so please try replacing it with 127.0.0.1.
The hint with 127.0.0.1 was exact the solution. Thanks for this. I ran my server in phpStorm at localhost and could not make the validation work. The host was accessible, the validation file was created, but it simply didn't work. Changing localhost in the server settings to 127.0.0.1 worked.
But anyway: I wonder, why it is such a pita, to setup debugging in a jetbrains product. They work always like a charm out of the box. But setting up a php-server for debugging is still the same confusing procedure as if i would take php.exe and set it up by myself. It would be great, if this installation would be more integrated with phpstorm.