【问题标题】:not able to debug eclipse helios 3.6无法调试 eclipse helios 3.6
【发布时间】:2012-12-28 10:19:37
【问题描述】:

我有以下场景:

xdebug 2.0.0rc1-5.1.2 日食太阳神 php 5.1.6

我正在尝试在 Eclipse 上调试 php 应用程序,但它不会在断点处停止。浏览器已正确初始化。我认为 xdebug 、 eclipse helios 和 php 的版本是兼容的。我已经删除了所有断点,并再次创建了它。 xdebug 出现在配置为扩展的 phpinfo 中。

有人知道为什么它不起作用吗?

提前致谢。

phpinfo中的xdebug详细信息:

版本 2.0.0RC1

Supported protocols Revision 
DBGp - Common DeBuGger Protocol  $Revision: 1.99 $  
GDB - GNU Debugger protocol  $Revision: 1.81 $  
PHP3 - PHP 3 Debugger protocol  $Revision: 1.20 $  

Directive Local Value Master Value 
xdebug.allowed_clients no value no value 
xdebug.auto_trace Off Off 
xdebug.collect_includes On On 
xdebug.collect_params Off Off 
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.idekey francescjp no value 
xdebug.manual_url http://www.php.net http://www.php.net 
xdebug.max_nesting_level 100 100 
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 /tmp 
xdebug.profiler_output_name crc32 crc32 
xdebug.remote_autostart Off Off 
xdebug.remote_enable On On 
xdebug.remote_handler ”dbgp” ”dbgp” 
xdebug.remote_host 127.0.0.1 127.0.0.1 
xdebug.remote_log no value no value 
xdebug.remote_mode req req 
xdebug.remote_port 9000 9000 
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 /tmp /tmp 
xdebug.trace_output_name crc32 crc32 
xdebug.var_display_max_data 512 512 
xdebug.var_display_max_depth 2 2 

【问题讨论】:

  • PHP 应用程序是否与您开发的主机运行在同一台主机上? (日食在哪里运行)?您是否有运行阻止端口 9000 的防火墙?
  • 是的,但我已经指定了一个允许使用此端口的例外情况..
  • 你熟悉Wireshark吗?
  • 是的。好主意。我会看看它会发生什么。非常感谢

标签: php xdebug eclipse-3.6


【解决方案1】:

您是否检查过您是否使用了正确版本的 Xdebug?向导将帮助您选择 wright 版本http://www.xdebug.org/wizard.php

我不知道您使用的是哪个操作系统,但我猜是 Windows。我在 Unbuntu 和 Windows (Xdebug and Netbeans are not communicating with each other) 上遇到了类似的 netbeans 问题。因为 Netbeans 和 Eclipse 似乎共享许多共同的元素,这可能会有所帮助。在 Eclipse 中将端口号设置为 9001。

编辑:更多信息

这是我的配置:

XAMPP Version 1.8.1.
Windows 7
Eclipse PDT 32bit version
Xdebug 2.2.1

我的建议是将所有内容更新到最新版本或使用完全相同的配置。

在我的 php.ini 文件 (C:\xampp\php\php.ini) 中,我有以下设置。您可以通过控制面板 -> 配置 -> PHP (php.ini) 访问 php.ini。

[XDebug]
zend_extension = C:\xampp\php\ext\php_xdebug-2.2.1-5.4-vc9.dll
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
;xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
;xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "C:\xampp\tmp"
;xdebug.remote_port="9000"
;xdebug.remote_autostart = 1
;xdebug.remote_mode=reg
;xdebug.idekey=netbeans-xdebug
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

AND 关闭报告 php.ini 中的 zend 调试

; This setting is on by default.
report_zend_debug = 0

Eclipse 中的 Xdebug 配置:

Start Eclipse -> Explorer window -> File -> Properties -> PHP -> PHP debug -> 默认设置下选择Xdebug而不是Zend。 (如果需要配置:Xdebug 到端口 9000)。

【讨论】:

  • 我已经检查过我使用了正确版本的 xdebug。我会尝试更改端口号。我会告诉你它是如何工作的。
  • 我已经更改了eclipse上的端口。但结果是一样的
  • 我使用了xdebug 向导并告诉我以下信息: •Xdebug 已安装:仅作为PHP 扩展!和 syas 也不再支持构建此 PHP 的编译器 (MS VC6)。请升级到使用 MS VC9 构建的版本。我使用的 xdebug 版本不在 vc9 中提供
  • 您使用的是哪个操作系统? Windows、Linux 或 Mac。如果您使用的是 Windows,我建议您安装 XAMPP。
  • 你注释掉了 php.ini 中的 Zend Optimizer 吗?
猜你喜欢
  • 1970-01-01
  • 2011-09-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-03-08
  • 1970-01-01
相关资源
最近更新 更多