Forget about \Doctrine\Common\Util\Debug::dump - it works but it is not pretty and messes up with the code. And you can't use "echo" unless you use "exit" after it as the execution continues after the echo and it is lost.
Install Symfony Dumper component -
https://symfony.com/doc/current/components/var_dumper.html
- I would install it globally for your working environment that way you can use it every time for every project.
Then you can use
to dump the request without interrupting the execution. You can also use
which will dump the variable and exit. You can also use it within assigns as the dump function returns whatever you are dumping
Code:
$request = dump(Request);
$request will be assigned the value of Request and value will be dumped, that way you get to see what Request holds without stopping the normal execution of the process.
You can also use it in twig files...