首页 > 解决方案 > PhpStorm + Xdebug + VMware VM = 连接到客户端超时

问题描述

我的 Debian 服务器(一个 VMware 虚拟机)已启动并正在运行,我的 PhpStorm 中的所有设置都正常。我已将虚拟机网络适配器设置为桥接(也尝试过 NAT)。

我的xdebug.ini样子是这样的:

zend_extension=xdebug.so
xdebug.profiler_enable=On
xdebug.remote_enable=On
xdebug.remote_host=MY_HOST_IP_ADDRESS
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=1
xdebug.remote_log="/tmp/xdebug.log"

不过,我xdebug.log看起来很生气:

Log opened at 2018-07-01 14:54:08
I: Connecting to configured address/port: MY_HOST_IP_ADDRESS:9000.
E: Time-out connecting to client. :-(
Log closed at 2018-07-01 14:54:09

事实上,当我从我的访客机器上使用 telnet 时......

telnet MY_HOST_IP_ADDRESS 9000
Trying MY_HOST_IP_ADDRESS...
telnet: Unable to connect to remote host: Connection refused

几天后我真的不知道如何完成这项工作。我的 SSH 隧道也已启动并正在运行(我使用了内置的 PhpStorm SSH 工具),但甚至netcat没有帮助我:

 nc MY_HOST_IP_ADDRESS 9000
 (UNKNOWN) [MY_HOST_IP_ADDRESS] 9000 (?) : Connection refused

这是我的 PhpStorm 配置(如您所见,验证脚本看起来不错):

验证 命令行界面 我错过了什么?

标签: phpstormvmwarexdebugremote-debugging

解决方案


推荐阅读