PHPStorm - "无法接受外部xdebug连接"关于流浪者

时间:2015-11-23 13:52:40

标签: php vagrant phpstorm xdebug

我正在尝试 - 使用组合PHPstorm / xdebug / vagrant失败。每当我尝试调试某些内容时,PHPStorm都会向我发出Cannot accept external xdebug connection错误。

这是xdebug配置:

[xdebug]
zend_extension="/usr/lib/php5/20131226/xdebug.so"
extension=xdebug.so
xdebug.remote_enable = on
xdebug.remote_connect_back = on
html_errors=1
xdebug.extended_info=1
xdebug.remote_log="/var/log/xdebug/xdebug.log"
xdebug.remote_port = 9000
xdebug.remote_autostart = 0
xdebug.idekey = "vagrant"
xdebug.default_enable = 1
xdebug.remote_host=192.168.33.10

下面的图片显示了我的phpstorm配置: Remote debug settings HTTP Request settings Web Application settings Remote server settings

此外,我的php -i | grep xdebug输出:

PHP Warning:  Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0
/etc/php5/cli/conf.d/20-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.force_display_errors => Off => Off
xdebug.force_error_reporting => 0 => 0
xdebug.halt_level => 0 => 0
xdebug.idekey => vagrant => vagrant
xdebug.max_nesting_level => 256 => 256
xdebug.max_stack_frames => -1 => -1
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_enable_trigger_value => no value => no value
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 => On => On
xdebug.remote_cookie_expire_time => 3600 => 3600
xdebug.remote_enable => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => 192.168.33.10 => 192.168.33.10
xdebug.remote_log => /var/log/xdebug/xdebug.log =>                 /var/log/xdebug/xdebug.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_enable_trigger_value => no value => no value
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

我的主机正在运行Elementary OS,我的流浪盒正在运行Scotch盒子(因此,两者都是ubuntu 14.04)。

主要问题是:如何设置PHP以在我当前的环境中使用xdebug调试我的PHP代码?

0 个答案:

没有答案