PHP,Eclipse,远程调试,CentOS,57%

时间:2013-04-03 21:15:36

标签: php eclipse xdebug

我有一台Mac(10.8.3)开发机器连接到Eclipse June Service 2下运行PHP 5.4.13的CentOS(6.3)VM。

我遇到了可怕的“启动测试(57%)......”问题。我已经浏览了整个网络/堆栈溢出,似乎有一堆建议(我试过,其中没有一个似乎解决了我的问题)。

我的/etc/php.ini文件如下所示:

[xdebug]
zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.remote_enable=On
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"
xdebug.remote_port=9000
xdebug.remote_host="10.211.55.3"
xdebug.remote_log=/tmp/xdebug_remote_log
xdebug.remote_connect_back=0

我的/etc/php.d/xdebug.ini文件如下所示:

; Enable Xdebug extension module
extension=xdebug.so

; Configure the extension [See Xdebug documentation for options to add here]
xdebug.remote_enable=On
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"
xdebug.remote_port=9000
xdebug.remote_host="10.211.55.3"
xdebug.remote_log=/tmp/xdebug_remote_log
xdebug.remote_connect_back=0


$ php -i | grep -i xdebug
/etc/php.d/xdebug.ini,
xdebug
xdebug support => enabled
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 => no value => no value
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 => /tmp
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 => 10.211.55.3 => 10.211.55.3
xdebug.remote_log => /tmp/xdebug_remote_log => /tmp/xdebug_remote_log
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 => /tmp => /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 :(得分:0)

我使用PHP eclipse的经历向我展示了以下具有这种行为的场景:

1 - 我尝试调试的网站无法正常运行。我的意思是,如果我们有一个内部错误,例如,apache将无法运行该站点,也无法对其进行调试。
2 - 不允许客户端计算机获取xdebug信息。当我们有DHCP服务器并经常更改远程主机IP时,通常会发生这种情况。

因此,请确保您尝试运行的网站在eclipse调试之外运行。在浏览器中打开它,看看它是否正在运行。 另外,请确保eclipse机器具有您在xdebug.remote_host参数上通知的IP。