niklas
niklas

Reputation: 3011

Sublime Debugging with Xdebug - Array

currently i am got xdebug and sublime set up but i have problems to find out array values while debugging. The current debug view would be

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

However the arrays certainly contain values. Is there a XDebug setting for seeing deeper into array values? I did not change the default settings of XDebug.

Upvotes: 1

Views: 877

Answers (2)

Tools > XDebug > Settings - Default

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

Upvotes: 3

Derick
Derick

Reputation: 36784

Xdebug does not have settings for this, but it is something the IDE (Sublime) can set while communicating with Xdebug. The protocol allows for fetching of deeper elements through the property_get and property_value commands in the DBGp protocol: http://www.xdebug.org/docs-dbgp.php#properties-variables-and-values and it is also possible to set the default depth level through the protocol too (with the max_depth feature: http://www.xdebug.org/docs-dbgp.php#feature-names).

It is possible that there is an option in Sublime that allows you change the default values for this as well, but not having Sublime installed I can not confirm this.

Upvotes: 2

Related Questions