Can't start listening for connections from 'xdebug': Port 18000 is busy Follow
Hi,
I have a site running on vagrant (dev.mysite.com:8080) . Here's the xdebug settings in php.ini:
zend_extension="/usr/lib/php5/20090626/xdebug.so"
xdebug.default_enable = 1
xdebug.idekey = "vagrant"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_port = 18000
xdebug.remote_handler=dbgp
xdebug.remote_log="/var/log/xdebug/xdebug.log"
xdebug.remote_host=10.16.24.204 ; IDE-Environments IP, from vagrant box.
Here are my settings in PHPstorm8:
http://picpaste.com/pics/AiV9SRTy.1421606432.png
http://picpaste.com/pics/Orqp44WY.1421606620.png
As soon as I click on 'start listening for PHP debug connection' I get an error saying port 18000 is busy.
Port 18000 is free until I either start PHPStorm or start debugging session in chrome.
This is the first time I am using PHPStorm and my assumsion is that my php.ini settings and PHPStorm settings are incorrect. Please assist.
Please sign in to leave a comment.
Hi there,
Use netstat and check who is using that port. If anything -- change to another one.
@Andriy Bazanov as I tried to explain in my original post the port is free until I start phpStorm. I used sudo lsof -n -i4TCP:18000 to verify. To clarify: phpstorm starts listening on port 18000 as soon as it starts. Meaning it starts listening even before I click "start listening for php debug connection" button. Same thing was happing when I was using port 9000. Is there something wrong in my settings?
There is nothing wrong with your settings (as per your screenshots).
I do not see how PhpStorm can start listeing on xdebug port (be it 9000 or 18000) automatically on start:
Right now I may only suggest:
Deleting all the config files and then putting in all setttings did the trick. PhpStorm no longer starts listeing on any port soon as it starts. Remote debuggin is now working :)
Just a note for others that have this issue - I was following the steps outlined here for profiling plugin cpu usage, and I started to experience this issue. Went away after I removed the line `-agentlib:yjpagent=delay=10000,probe_disable=*` from phpstorm.vmoptions. One more option to try if folks are still stuck.