【发布时间】: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并在调试会话后检查日志