Xdebug未在vagrant上的PHPstorm中的CLI脚本断点上停止

Xdebug未在vagrant上的PHPstorm中的CLI脚本断点上停止,php,phpstorm,xdebug,Php,Phpstorm,Xdebug,不确定我是怎么打破它的,但是当运行CLI脚本(如Laravel命令)时,Xdebug不再在我的vagrant上处理任何项目。仍然可以处理web请求 以下是/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_en

不确定我是怎么打破它的,但是当运行CLI脚本(如Laravel命令)时,Xdebug不再在我的vagrant上处理任何项目。仍然可以处理web请求

以下是
/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
PHPStorm在项目首选项中为Xdebug上的端口9001配置。(端口9000上的HHVM冲突,即使我没有运行HHVM)

对于我的vagrant开发主机的“PHP远程调试”配置,我还将ide键设置为“PHPSTORM”

在PHPStorm中还为该服务器设置了绝对路径

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

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
这是运行在MacOS10.11.1上PHPStorm9.0.2下的一个稍微修改过的Homestead流浪者盒子上的Ubuntu14


这里有什么不对劲的地方可以解释这个故障吗?

当我意识到另一个在xdebug配置中带有
xdebug.remote\u host=192.168.56.1
的vagrant box正在通过CLI连接时,修复了这个问题。VagrantFile的值为ip:“192.168.56.101”

这让我发现了一个使用相同IP协议的应用程序

考虑到这一点,我从我的vagrant box上的vagrant文件中获取了Xdebug无法从CLI连接到的
ip:“192.168.10.10”
值,并将其更改为在设置
Xdebug.remote\u host=192.168.10.1
中使用


现在,我可以再次使用PHPStorm从该vagrant框调试断点了。:)

1)请提供xdebug日志(
xdebug.remote\u log
)。到目前为止,它很可能有效。。。但连接到本地端口,而不是远程端口(您的电脑)。2) 由于您希望在浏览器中调试脚本(基于PhpStorm中的运行/调试配置;我说得对吗?),因此您还应该通过浏览器捕获
phpinfo()
输出。如果您打算调试实际的CLI脚本(在CLI环境中启动和执行,例如在终端中),则此配置为inoimplete.So--xdebug log first。之后,我们可以看看3)这些端口是否在实际的Vagrant中映射/打开(可以进行传出连接);4) 可能是您的本地防火墙。web Xdebug连接已经可以工作了。只有CLI连接断开。用
remote\u log
值更新了问题。