我在PhpStorm中设置配置以在Docker上运行Xdebug。尝试使用以下方法调试PhpStorm事件日志中的PHP脚本输出:
“运行script.php时出错:端口9000繁忙”
我更改了端口,但没有解决相同的问题
-config文件xdebug.ini
xdebug.idekey = PHPSTORM
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_connect_back=1
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_log=/tmp/php5-xdebug.log
您还需要在PhpStorm配置/设置中更改端口。需要打开端口并进行监听的是PhpStorm,而不是Xdebug。
而且,如果您使用的是PHP-FPM,它已经打开了端口9000,因为他们很不幸选择了相同的端口。