Can’t start listening for connections from ‘xdebug’: Port 9000 is busy
We correct an error in xdebug when the port for debug operation is busy.
Change port in PhpStorm settings
If xdebug is configured through Vagrant, then the port should be changed in the vagrant.
We go to the server
vagrant ssh
Find your php version
php -v
Go to the xdebug configuration
cd /etc/php/7.4/cli/conf.d
Open file
sudo nano 20-xdebug.ini
Add a line with a new port:
xdebug.remote_port = 9003
Exits the vagrant and reboots it:
exit
vagrant reload
vagrant reload