PhpStorm永远不会在Xdebug的断点处停下来

时间:2017-12-25 21:52:48

标签: php debugging phpstorm xdebug breakpoints

我尝试将PhpStorm配置为在远程服务器上使用Xdebug。使用WAMP在localhost上托管Xdebug已经有效了。

我已经使用Putty从我的远程服务器隧道端口9000,telnetting正在工作,我得到了黑屏。

Xdebug配置如下:

zend_extension = /usr/lib64/php/modules/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_host="127.0.0.1"
xdebug.remote_autostart =1
xdebug.remote_enable =1
xdebug.remote_port=9000

每当我在PhpStorm上按下调试时,由于某种原因,它都会“连接到localhost:3308”。

我在Chrome 63中使用Xdebug helper 1.6.1。在我的服务器上,我使用Xdebug 2.6和PHP版本7.1.10。我使用PhpStorm 2017.3.1。

编辑1: 似乎日志未在服务器端打开,这里是日志:

Log opened at 2017-12-26 11:11:31
I: Connecting to configured address/port: 127.0.0.1:9009.
W: Creating socket for '127.0.0.1:9009', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2017-12-26 11:11:31

Log opened at 2017-12-26 11:11:31
I: Connecting to configured address/port: 127.0.0.1:9009.
W: Creating socket for '127.0.0.1:9009', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2017-12-26 11:11:31

Log opened at 2017-12-26 11:11:31
I: Connecting to configured address/port: 127.0.0.1:9009.
W: Creating socket for '127.0.0.1:9009', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2017-12-26 11:11:31

Log opened at 2017-12-26 11:11:31
I: Connecting to configured address/port: 127.0.0.1:9009.
W: Creating socket for '127.0.0.1:9009', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2017-12-26 11:11:31

Log opened at 2017-12-26 11:11:31
I: Connecting to configured address/port: 127.0.0.1:9009.
W: Creating socket for '127.0.0.1:9009', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2017-12-26 11:11:31

在本地远程登录到9009端口被拒绝。

有谁知道为什么它不起作用?

1 个答案:

答案 0 :(得分:2)

将端口更改为9009并且不要忘记在PhpStorm中使用此设置