phpstorm - 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 配置(如您所见,验证脚本看起来不错):
解决方案
推荐阅读
- c - 这段代码应该简单地读取一个包含日期的文件并将它们保存在一个结构数组中,但是当我控制打印时,我得到了奇怪的结果
- java - Java JPEG 十六进制转 ASCII
- javascript - 在 tomcat 8 部署上使用 ajax axios 发布时出现错误 404 spring v2.3.2
- swagger - OpenAPI3 和 Swagger:如何从一个组件参数的描述引用到另一个描述?
- amazon-web-services - 在 AWS Lambda 和 Node.js 12.x 中使用自定义字体
- angular - 在“Modal”中使用 NativeScript“Switch”事件时不起作用
- node.js - 将无效的 id 传递给 mongoose 中的查询函数后,如何避免出现“Cast to ObjectId failed for value”?
- react-native - 如何在函数组件中呈现 redux 存储值?
- arrays - React Native:使用 redux 持久存储数据,如对象数组
- xcode - 使用 Xcode 作为 EDITOR 环境变量或从命令行打开 Xcode 中的特定文件