I use this tacked on to the twig to show the contents of the data array
{% if translate ('debug')=='1'%}<div class="panel panel-default"><div class="panel-heading">Debug Information</div><div class="panel-body">
_context twig global
<textarea class="form-control" style="height:10em;" >{{ _context|json_encode(constant('JSON_PRETTY_PRINT')) }}</textarea>
</div></div>{%endif%}
Copy code
and then I set debug=1 on the forum translation file to toggle it
_context twig global
<textarea class="form-control" style="height:10em;" >{{ _context|json_encode(constant('JSON_PRETTY_PRINT')) }}</textarea>
</div></div>{%endif%}
Copy code