0

我有以下情况:

xdebug 2.0.0rc1-5.1.2 Eclipse Helios 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 
4

1 回答 1

1

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

我不知道您使用的是哪个操作系统,但我猜它是 Windows。我在 Unbuntu 和 Windows 上遇到了与 netbeans 类似的问题(Xdebug 和 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 配置:

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

于 2013-01-16T12:58:55.487 回答