I have made a function that finds all the URLs within an html file and repeats the same process for each html content linked to the discovered URLs. The function is recursiv
You can also modify the {debug} function in modifier.debug_print_var.php, in order to limit its recursion into objects.
Around line 45, before :
$results .= '
' . str_repeat(' ', $depth * 2)
. ' ->' . strtr($curr_key, $_replace) . ' = '
. smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
After :
$max_depth = 10;
$results .= '
' . str_repeat(' ', $depth * 2)
. ' ->' . strtr($curr_key, $_replace) . ' = '
. ($depth > $max_depth ? 'Max recursion depth:'.(++$depth) : smarty_modifier_debug_print_var($curr_val, ++$depth, $length));
This way, Xdebug will still behave normally: limit recursion depth in var_dump and so on. As this is a smarty problem, not a Xdebug one!