How to fix Twig Whitescreen on {{dump(var)}}

This one has been doing my head in for a while now.

Once your forms get past a certain size / complexity, the {{dump(var)}} command tends to bomb out, and throw up a rather unhelpful white screen.

Many of the results on Google tend to say – increase your PHP memory limit – never has more of an impact than taking longer to display the damn white screen.

Boo hiss, shake your first at things, etc.

Anyway, I finally found a solution.

Get your project back on track with the Ladybug Bundle.

{{ ladybug_dump(form) }}

A little of the above gives you a little of the below.

And yes, each section is expandable to give you loads of helpful detail.


Excuse the crappy screengrab – I had to resize to get it to fit and it looks gashbag. Hey, I never said I was a designer.

Just a kick ass Symfony 2 expert 😉

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.