Xdebug hiding dump information?

扶醉桌前 提交于 2019-12-05 02:00:38

Xdebug truncates the output of (at least) strings and arrays, to avoid it getting to big.

The amout of data that's printed can be configured using these directives :

For more informations and example, see Variable Display Features


You'll have to edit your php.ini file (or xdebug.ini file, depending on your setup), to define those directives, with values that suit your needs.

For example, on Ubuntu, in my /etc/php5/conf.d/xdebug.ini file, I have the following lines :

xdebug.var_display_max_children = 256
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 8

Just edit in your php.ini file

xdebug.var_display_max_depth = 10 #example
prefectionist

@Smittles - xdebug vars can be set at runtime via ini_set:

ini_set('xdebug.var_display_max_depth', 5);
ini_set('xdebug.var_display_max_children', 256);
ini_set('xdebug.var_display_max_data', 1024);

See Michael Berkowski's excellent answer here: https://stackoverflow.com/a/9998628/6073709

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!