XDEBUG适用于URL,但不适用于Cookie集

时间:2012-03-11 11:21:43

标签: php cookies xdebug

我的XDEBUG环境已设置好并且在大多数情况下正在运行。我正在开发一个简单的基于REST的Web服务,如果我以下列格式传递URI,我可以调试好

POST http://192.168.1.121:8888/QDOSStatsLogger/statLogger.php?XDEBUG_SESSION_START=ECLIPSE_DBGP HTTP/1.1
Content-Type: application/json; charset=utf-8
Accept: application/json, text/javascript, */*
Host: 192.168.1.121:8888
Content-Length: 295
Expect: 100-continue

当我尝试使用完全相同的cookie设置时,它无法启动调试器

这就是cookie情况下的线索(如fiddler所见)

POST http://192.168.1.121:8888/QDOSStatsLogger/statLogger.php HTTP/1.1
Content-Type: application/json; charset=utf-8
Accept: application/json, text/javascript, */*
Host: 192.168.1.121:8888
Cookie: XDEBUG_SESSION_START=ECLIPSE_DBGP
Content-Length: 295
Expect: 100-continue

我对phpInfo的输出与xdebug相似。我错过了一些明显的东西吗?

xdebug.auto_trace   Off Off
xdebug.cli_color    0   0
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.coverage_enable  On  On
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   tony    ECLIPSE_DBGP
xdebug.manual_url   http://www.php.net  http://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  /tmp/xdebug/    /tmp/xdebug/
xdebug.profiler_output_name cachegrind.out.%p   cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back  Off Off
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   no value    no value
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_enable_trigger Off Off
xdebug.trace_format 0   0
xdebug.trace_options    0   0
xdebug.trace_output_dir /var/tmp/   /var/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

提前致谢

1 个答案:

答案 0 :(得分:3)

Documentation州:

  

当URL变量XDEBUG_SESSION_START = name附加到URL时   Xdebug发出一个名为“XDEBUG_SESSION”的cookie,并将其作为值   XDEBUG_SESSION_START URL参数的值。

所以cookie被称为XDEBUG_SESSION,但您的HTTP客户端似乎正在传递另一个名称的cookie:

Cookie: XDEBUG_SESSION_START=ECLIPSE_DBGP