Xdebug - 在单步调试中增加 var_display_max_depth

Xdebug - increase var_display_max_depth in Step Debugging

根据 Xdebug 文档:

integer xdebug.var_display_max_depth = 3 #
Controls how many nested levels of array elements and object properties are when variables are displayed with either xdebug_var_dump(), xdebug.show_local_vars or when making a Function Trace. The maximum value you can select is 1023. You can also use -1 as value to select this maximum number.
This setting does not have any influence on the number of children that is send to the client through the Step Debugging feature.

但是,我试图在 PhpStorm 中显示一个嵌套对象,我预计会得到这个结果:

转载:

$n = new Map();
$n["test"] = new Map();
$n["test"]->put("lorem", new Map());
$n["test"]["lorem"]->put("ipsum", "dolor");
$m = ["m" => ["k" => ["r" => ["h" => ["test_var"]]]]];

所以我有两个问题:

Xdebug 和 PhpStorm 应该都能处理这两种情况。 var_display_max_children设置确实不是为了单步调试,但协议允许PhpStorm请求更多信息。

可能是这里有一个错误,或者你有一个旧版本的 PhpStorm 与 Xdebug 谈论这个问题。

无论哪种情况,我都建议您在 https://bugs.xdebug.org with a short and self-contained script. Please follow the instructions at https://xdebug.org/reporting-bugs

提交错误报告