Xdebug hiding dump information?

2019-04-21 15:26发布

I am using xdebug with my php methods such as var_dump() are beautiful but not showing full information instead the dump ends with three dots ... which might be the sign of continuation followed by

(length=87749)

How should I tell xdebug to show full dump ?? Thanks

3条回答
疯言疯语
2楼-- · 2019-04-21 16:18

Just edit in your php.ini file

xdebug.var_display_max_depth = 10 #example
查看更多
仙女界的扛把子
3楼-- · 2019-04-21 16:26

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
查看更多
祖国的老花朵
4楼-- · 2019-04-21 16:30

@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

查看更多
登录 后发表回答