【问题标题】:xDebug session never startsxDebug 会话永远不会启动
【发布时间】:2012-04-01 15:55:00
【问题描述】:

我刚刚将操作系统更改为 Windows 7 64。 我的机器上安装了带有 PDT 的 Apache 2.2、PHP 5.3(32 位)TS 和 Eclipse 3.7(64 位)。

我的 php.ini 中的 xDebug 部分

zend_extension = "C:\Program Files (x86)\PHP\ext\php_xdebug-2.1.4-5.3-vc9.dll"
xdebug.auto_trace = 0
xdebug.collect_includes = 1
xdebug.collect_params = 0
xdebug.collect_return = 0
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.idekey = "STATION24$"
xdebug.max_nesting_level = 100
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "C:\WINDOWS\temp"
xdebug.profiler_output_name = "xdebug_profile.%p"
xdebug.remote_autostart = 0
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_log = 1
xdebug.remote_mode = "req"
xdebug.remote_port = 9001
xdebug.show_exception_trace = 0
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 0
xdebug.trace_output_dir = "C:\WINDOWS\Temp"
xdebug.trace_output_name = "trace.%c"
xdebug.var_display_max_depth = 5

在 Eclipse 中,我配置了 PHP->Debug 部分,如图所示:

现在,当我尝试启动调试时,Eclipse 在启动调试会话时冻结。

所以,我过去读到过这个问题,人们说这是因为某些应用程序使用 xDebug 端口(在我的情况下为 9001),但我已经检查过,没有其他使用此端口,只有 xDebug 使用。 我的防火墙已禁用,因此没有任何应用程序可以阻止与 xDebug 的连接。还有一件事——“调试为 CLI 应用程序”效果很好,只有“调试为 Web 应用程序”不起作用。

我不知道该怎么办,请帮忙。

【问题讨论】:

  • 问题已解决。我刚刚忘记在 Eclipse 设置中设置浏览器。

标签: eclipse settings xdebug


【解决方案1】:

如果您遇到问题并且不知道是 Xdebug 端还是 IDE 端不工作,那么从 Xdebug 2.2.0RC1 开始,远程调试日志也会记录连接问题。

【讨论】:

    【解决方案2】:

    只是一个想法,你提到了 PHP TS。也许你也应该使用 xdebug TS 呢? (虽然我最近到处读到你最好不要使用 TS,所以可能想改变 php 而不是 TS 左右)。

    【讨论】:

      猜你喜欢
      • 2011-01-23
      • 1970-01-01
      • 2017-03-12
      • 1970-01-01
      • 1970-01-01
      • 2022-01-15
      • 2016-10-21
      • 2019-06-22
      相关资源
      最近更新 更多