我在phpstorm
中设置了php.ini
和Debug config
。尝试调试PHP脚本输出在phpstorm事件日志:在php.ini运行script.php时出错:端口9000正忙
"Error running script.php: Port 9000 is busy"
末:
[XDebug]
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port="9000" (the default port is 9000)
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir="/etc/php5/xdebug/profiler_output_dir"
在pStorm
调试端口也被设置在9000 netstat -na
输出,:
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN
如果我设置为其他端口,该怎么办。例如将其设置为10001
似乎可以完成这项工作。或者只是如何使其正常工作。我不确定我是否了解xDebug
的工作原理。它像运行Debug("script.php")(Shift+F9)
在phpstorm与文件中设置断点?
有人有想法吗?
编辑:
来源: http://xdebug.org/docs/remote
xdebug.remote_port
Type: integer, Default value: 9000
The port to which Xdebug tries to connect on the remote host. Port 9000 is the default for both the client and the bundled debugclient. As many clients use this port number, it is best to leave this setting unchanged.
如果我改变端口以外的9000是什么?也许超过50K的东西。
*“端口9000正忙”* - 这意味着另一个应用程序(不是PhpStorm或完全不同的PhpStorm实例)已经在该端口上侦听。 IDE在该端口上侦听(接收连接),而xdebug是连接到IDE的人,而不是其他方式。官方的xdebug文档详细解释了xdebug如何与调试客户端(IDE)协同工作:http://xdebug.org/docs/remote – LazyOne