2013-06-05 19 views
1

目前我得到了xdebug和sublime的設置,但我在調試時發現數組值有問題。當前的調試視圖將是使用Xdebug - 陣列升級調試

$current_user->roles [array] = 
$current_user->allcaps [array] = 
$current_user->filter [null] = 
$id [int] = 12 
$postsByAuthor [array] = 
$wpdb [object] = 

但是,數組肯定包含值。是否有XDebug設置可以更深入地查看數組值?我沒有更改XDebug的默認設置。

回答

2

Xdebug沒有爲此設置,但它是IDE(Sublime)在與Xdebug進行通信時可以設置的。該協議允許通過DBGp協議中的property_get和property_value命令獲取更深的元素:http://www.xdebug.org/docs-dbgp.php#properties-variables-and-values,也可以通過協議設置默認深度級別(使用max_depth功能:http://www.xdebug.org/docs-dbgp.php#feature-names)。

可能在Sublime中有一個選項,允許您爲此更改默認值,但沒有安裝Sublime我無法確認這一點。

+0

很高興在這裏有XDebug的終極知識資源的SO :) – hek2mgl

3

工具>的XDebug>設置 - 默認

// Maximum amount of nested levels to retrieve 
// of array elements and object properties. 
"max_depth": 1