I have around 40 entities and many bidirectional relationships. Whenever i use var_dump($user) or any entity my browser gets loaded with too much data of arrays and variable
Symfony < 2.6
You can use \Doctrine\Common\Util\Debug::dump($variable, $depth);
it displays doctrine output without the proxy information.
Symfony > 2.6
If you are using symfony 2.6 or more, I strongly advice you to use dump()
.
It shows a well formated and colored output, and you can dynamically expend/hide rows.