1

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.

2 Answers 2

3

Tools > XDebug > Settings - Default

// Maximum amount of nested levels to retrieve
// of array elements and object properties.
"max_depth": 1
Sign up to request clarification or add additional context in comments.

Comments

2

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.

1 Comment

nice to have the ultimate knowledge resource for xdebug here on SO :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.