Debugging
David Longworth 2016-11-25T14:41:55Z
84 words
1 min read

Debug mode

If enabled in the config "allowJsonView": true you can append ?json=true to any page in the browser get back the JSON data structure of the given page.

Context dump

A handy feature of Dust.js is the ability to perform a {@contextDump/}.

You can use this to output the JSON, similarly to the debug url feature above, but with the added benefit of it being inline with the HTML output.

Some examples, added to page.dust files:

{@contextDump/}

In a context:

{#people}
  {@contextDump/}
{/people}

See something to improve? Edit in Github.