Xdebug不会停止在PHPstorm上的CLI脚本断点上进行流浪

时间:2015-11-17 06:47:28

标签: php phpstorm xdebug

我不知道我做了什么打破它,但是当运行Laravel命令等CLI脚本时,Xdebug不再处理我的流浪者的任何项目。仍然适用于网络请求。

以下是/etc/php5/cli/conf.d/20-xdebug.ini的内容:

zend_extension=xdebug.so
xdebug.var_display_max_data = -1
xdebug.var_display_max_depth = 10
xdebug.default_enable = 1
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_port = 9001
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.idekey = PHPSTORM
xdebug.collect_return = 1
xdebug.collect_params = 10
xdebug.show_mem_delta = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "/home/vagrant/Projects/xdebug_profiler"
xdebug.trace_enable_trigger = 1
xdebug.trace_output_dir = "/home/vagrant/Projects/xdebug_traces"
xdebug.profiler_enable = 0
xdebug.trace_enable = 1
xdebug.cli_color = 1

PHTPtorm配置为项目首选项中Xdebug上的端口9001。 (即使我没有运行HHVM,HHVM也会在端口9000上发生冲突)

enter image description here

我也将ide键设置为" PHPSTORM"用于" PHP远程调试"我的流浪者开发者主机的配置。

enter image description here

PHPStorm中也为该服务器设置了绝对路径。

enter image description here

单击侦听器然后调试图标将打开调试选项卡,但它永远不会在任何断点上停止。

enter image description here

phpinfo()的CLI输出向我提供了关于Xdebug的信息:

xdebug support => enabled
Version => 2.3.2
IDE Key => PHPSTORM

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.145 $

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.cli_color => 1 => 1
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 10 => 10
xdebug.collect_return => On => On
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 => PHPSTORM => PHPSTORM
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 => On => On
xdebug.profiler_enable_trigger_value => no value => no value
xdebug.profiler_output_dir => /home/vagrant/Projects/xdebug_profiler => /home/vagrant/Projects/xdebug_profiler
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => On => On
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 => localhost => localhost
xdebug.remote_log => no value => no value
xdebug.remote_mode => req => req
xdebug.remote_port => 9001 => 9001
xdebug.scream => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => On => On
xdebug.trace_enable_trigger => On => On
xdebug.trace_enable_trigger_value => no value => no value
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /home/vagrant/Projects/xdebug_traces => /home/vagrant/Projects/xdebug_traces
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => -1 => -1
xdebug.var_display_max_depth => 10 => 10

以下是xdebug.remote_log输出:

Log opened at 2015-11-18 03:34:23
I: Checking remote connect back address.
W: Remote address not found, connecting to configured address/port: localhost:9001. :-|
E: Could not connect to client. :-(
Log closed at 2015-11-18 03:34:23

这是在Mac OS 10.11.1上PHPStorm 9.0.2下的一个稍微修改过的Homestead vagrant框上运行的Ubuntu 14。

这里有什么东西可以解释故障吗?

1 个答案:

答案 0 :(得分:0)

修正了这个问题,当我意识到xdebug配置中另一个带有xdebug.remote_host = 192.168.56.1的流浪盒通过CLI连接时。 VagrantFile的值为ip: "192.168.56.101"

这导致我发现使用相同类型的IP约定的post on walkah.net

考虑到这一点,我将VagrantFile的ip: "192.168.10.10"值从Xdebug无法从CLI连接到我的流浪盒上,并将其更改为在xdebug.remote_host = 192.168.10.1设置中使用。

我现在可以再次使用PHPStorm从那个流浪盒中调试断点。 :)

相关问题