Dump in Twig not outputting anything

How can i check in Twig contents of page object?

Tried in a twig template to call:

{{ dump(page) }}

But nothing happened. I’ve turned on Debug under Twig.

1 Like

Hi
Do you also have the debug bar running? You need to enable debugging and also twig debugging to see anything. The option is in the admin - configuartion - system - Debugger - Debugger -> yes

or in system.yaml

debugger:
  enabled: true

It’s true, i have that panel at the bottom, but it’s empty either.

Try this:

{{ dump('i am just a string') }}

if that string is not shown in debuger, then maybe that twig file is not used to display your page.

It was because debugbar injects system jquery, so i have double jquery libs. Switched to system’s jQuery and everything works.

1 Like

I had a similar problem. The DebugBar/Clockwork messages just showed “CENSORED” where the dump should be. After tracing the code I discovered a setting in system.yaml/debugger: censored: true that is not exposed in the admin panel. Setting this to false made it all work.

1 Like

Ah! It is exposed but the prompt is backwards. The admin panel prompt is Show sensitive data, suggesting setting it to yes will show more, but its the opposite. Setting it to yes sets censored: true which suppresses dump output.