【问题标题】:PHP debug configuration hangs - Waiting for XDebug session (57%) [duplicate]PHP 调试配置挂起 - 等待 XDebug 会话 (57%) [重复]
【发布时间】:2012-03-12 09:27:37
【问题描述】:

可能重复:
eclipse xdebug session never completes

当我尝试调试 php 网页时,它挂断了。消息 - 等待 XDEbug 会话。右下角还有一条信息——正在启动 mydebugconf: (57%)。

我在 x86 Windows 7 计算机上运行 XAMPP for Windows 1.7.7 和 PHP 5.3.8 和 Apache 2.0。

phpinfo() - xdebug

xdebug.auto_trace   Off Off
xdebug.collect_assignments  Off Off
xdebug.collect_includes On  On
xdebug.collect_params   0   0
xdebug.collect_return   Off Off
xdebug.collect_vars Off Off
xdebug.default_enable   On  On
xdebug.dump.COOKIE  no value    no value
xdebug.dump.ENV no value    no value
xdebug.dump.FILES   no value    no value
xdebug.dump.GET no value    no value
xdebug.dump.POST    no value    no value
xdebug.dump.REQUEST no value    no value
xdebug.dump.SERVER  no value    no value
xdebug.dump.SESSION no value    no value
xdebug.dump_globals On  On
xdebug.dump_once    On  On
xdebug.dump_undefined   Off Off
xdebug.extended_info    On  On
xdebug.file_link_format no value    no value
xdebug.idekey   DTWS01$ no value
xdebug.manual_url   www.php.net www.php.net
xdebug.max_nesting_level    100 100
xdebug.overload_var_dump    On  On
xdebug.profiler_aggregate   Off Off
xdebug.profiler_append  Off Off
xdebug.profiler_enable  Off Off
xdebug.profiler_enable_trigger  Off Off
xdebug.profiler_output_dir  C:\xampp\tmp    C:\xampp\tmp
xdebug.profiler_output_name xdebug_profile.%R::%u   xdebug_profile.%R::%u
xdebug.remote_autostart Off Off
xdebug.remote_connect_back  On  On
xdebug.remote_cookie_expire_time    3600    3600
xdebug.remote_enable    On  On
xdebug.remote_handler   dbgp    dbgp
xdebug.remote_host  localhost   localhost
xdebug.remote_log   c:\xdebug\log.txt   c:\xdebug\log.txt
xdebug.remote_mode  req req
xdebug.remote_port  9000    9000
xdebug.scream   Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars  Off Off
xdebug.show_mem_delta   Off Off
xdebug.trace_format 0   0
xdebug.trace_options    0   0
xdebug.trace_output_dir C:\xampp\tmp    C:\xampp\tmp
xdebug.trace_output_name    trace.%c    trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3  3

================================================ ===========

php.ini

[XDebug]
zend_extension = C:\xampp\php\ext\php_xdebug-2.1.2-5.3-vc9.dll
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "xdebug_profile.%R::%u"
xdebug.remote_autostart=off
xdebug.remote_connect_back =1
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_host="localhost"
xdebug.remote_log = "c:\xdebug\log.txt"
xdebug.remote_mode = "req"
xdebug.trace_output_dir = "C:\xampp\tmp"

=========================================

netstat -a -b -n |查找 /i “听”

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1025           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1026           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1027           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1029           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1030           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:5357           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:9000           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:10000          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:37674          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:53794          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:55723          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:60747          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:62062          0.0.0.0:0              LISTENING
  TCP    127.0.0.1:5354         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:6880         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:27015        0.0.0.0:0              LISTENING
  TCP    127.0.0.1:45100        0.0.0.0:0              LISTENING
  TCP    192.168.1.5:139        0.0.0.0:0              LISTENING
  TCP    [::]:80                [::]:0                 LISTENING
  TCP    [::]:135               [::]:0                 LISTENING
  TCP    [::]:443               [::]:0                 LISTENING
  TCP    [::]:445               [::]:0                 LISTENING
  TCP    [::]:1025              [::]:0                 LISTENING
  TCP    [::]:1026              [::]:0                 LISTENING
  TCP    [::]:1027              [::]:0                 LISTENING
  TCP    [::]:1029              [::]:0                 LISTENING
  TCP    [::]:1030              [::]:0                 LISTENING
  TCP    [::]:3306              [::]:0                 LISTENING
  TCP    [::]:3389              [::]:0                 LISTENING
  TCP    [::]:5357              [::]:0                 LISTENING
  TCP    [::]:9000              [::]:0                 LISTENING
  TCP    [::]:10000             [::]:0                 LISTENING
  TCP    [::]:53794             [::]:0                 LISTENING
  TCP    [::]:55723             [::]:0                 LISTENING
  TCP    [::]:62062             [::]:0                 LISTENING

================================================ ===================

提前感谢其他相关信息来源的建议、建议或指导。

DT

【问题讨论】:

    标签: php xampp xdebug


    【解决方案1】:

    这很可能是由于您的 IDE 中未正确设置某些服务器路径。您没有提及您使用的是哪个 IDE,所以我无法提供帮助。

    【讨论】:

    • 我正在使用 Eclipse。我现在可以通过设置 xdebug.remote_connect_back = 0 来让 XDebug 工作——可能是因为 $_SERVER['REMOTE_ADDR'] = ::1。这与@Derick 的回答一致。现在我需要弄清楚如何设置服务器路径。如您所见,我是第一次做这些东西。谢谢
    • 是的,::1 不能工作,因为 Xdebug 还不支持 IPv6。是的,将 connect_back 设置为 0 使其工作(当然只要 xdebug.remote_host 是正确的!)
    【解决方案2】:

    让 Xdebug 与 Netbeans 一起工作时,我遇到了类似的问题。这是我发现的。希望能帮助到你。 Xdebug + XAMPP + Netbeans = fail. Cannot get debugger to work in Netbeans

    【讨论】:

      猜你喜欢
      • 2013-04-13
      • 2012-03-21
      • 2015-06-08
      • 1970-01-01
      • 1970-01-01
      • 2018-09-02
      • 2013-01-14
      • 2011-12-10
      相关资源
      最近更新 更多