【问题标题】:Getting ERR_EMPTY_RESPONSE when listening xdebug connections in PhpStorm在 PhpStorm 中侦听 xdebug 连接时获取 ERR_EMPTY_RESPONSE
【发布时间】:2019-08-19 04:53:23
【问题描述】:

我曾经使用 Xdebug 在 PhpStorm 中本地调试 PHP 代码,但最近它停止了工作。当启用监听 Xdebug 连接时,我的 PHP 应用程序立即响应空响应,并且我在 Chrome 和 Firefox 中看到 ERR_EMPTY_RESPONSE。调试器可以正常工作,并且像往常一样在断点处停止执行。禁用监听后,应用程序按预期工作。

项目在本地 Apache Web 服务器上运行,但我还明确指定了路径映射。

我如何“调试”调试器以找出阻止网络服务器发出 http 响应的原因?

xdebug.ini:

zend_extension=xdebug.so
[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=8888
xdebug.profiler_enable=0
xdebug.profiler_output_dir="/var/opt/profiler"
xdebug.profiler_enable_trigger=0
xdebug.trace_enable=0
xdebug.trace_enable_trigger=0
xdebug.trace_output_dir="/var/opt/trace"
xdebug.max_nesting_level="1000"
xdebug.remote_host=localhost
xdebug.remote_mode=req
xdebug.idekey=PHPSTORM

PhpStorm 调试器配置:

【问题讨论】:

  • 尝试启用xdebug.remote_log=/log_path/xdebug.log 并在调试会话后检查日志

标签: php phpstorm xdebug


【解决方案1】:

我在 PHP 7.1.27、xdebug 2.7.0 中也遇到过这种情况。在每个调试请求的网络服务器日志中,都有一条消息“zend_mm_heap 已损坏”。

问题已通过升级到 PHP 7.1.28 和 xdebug 2.7.1 解决 基于this我认为唯一的xDebug升级是至关重要的。

【讨论】:

  • 谢谢。我遇到了同样的问题,并且通过这两次升级解决了它。
  • @BenRubin 我很高兴它有帮助! )
猜你喜欢
  • 2015-09-25
  • 2020-09-23
  • 2016-10-01
  • 1970-01-01
  • 2018-06-03
  • 2019-08-05
  • 1970-01-01
  • 2021-02-25
  • 2015-08-03
相关资源
最近更新 更多