During PHP debugging, if you need to store somewhere the value of a var_dump() (i.e., in a log file, or in an external file, or wherever, you can do it easily using PHP output buffering.
I.e., in order to save the structured info of the variable $myvariable into the string $mystring:
ob_start();
var_dump($myvariable);
$mystring = ob_get_clean();
print_r($mystring);