问题描述
我正在 xdebug (php_xdebug-2.1.2-5.3-vc9.dll) .wampserver.com/en/> WAMP .当我在大型对象或变量上使用var_dump
时,它不会显示完整的变量.
I am using xdebug (php_xdebug-2.1.2-5.3-vc9.dll) on WAMP. When I use var_dump
on a large object or variable it does not show the full variable.
array
'node' =>
array
'my_form' =>
array
'form' =>
array
...
没有xdebug,它显示应有的预期.我查看了文档,但没有找到解决方案.有谁知道我可以解决这个问题,以便xdebug var_dump
显示 full 对象?
Without xdebug it shows as should be expected. I looked at the documentation but did not see a solution. Does anyone know how I can fix this so xdebug var_dump
shows the full object?
推荐答案
这些是php.ini中的可配置变量:
These are configurable variables in php.ini:
; with sane limits
xdebug.var_display_max_depth = 10
xdebug.var_display_max_children = 256
xdebug.var_display_max_data = 1024
; with no limits
; (maximum nesting is 1023)
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
当然,它们也可以在运行时通过ini_set()
进行设置,如果您不想修改php.ini并重新启动Web服务器,但需要快速深入地进行检查,则很有用.
Of course, these may also be set at runtime via ini_set()
, useful if you don't want to modify php.ini and restart your web server but need to quickly inspect something more deeply.
ini_set('xdebug.var_display_max_depth', '10');
ini_set('xdebug.var_display_max_children', '256');
ini_set('xdebug.var_display_max_data', '1024');
这篇关于如何获取xdebug var_dump以显示完整的对象/数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!