我在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