rawsh You can try, but I'm not an expert. By the way, I caught the problem by a dirty but efficient solution: I put those line where I want to debug some variables:
ob_start();
var_dump($var1, $var2, etc.);
echo ob_get_clean(); die;
Or,
ob_start();
var_dump($var1, $var2, etc.);
file_put_contents('/path/to/debug/file', ob_get_clean()); die;