Routing and Template Cookbook: Errors and debugging

From Dreamwidth Notes
Jump to: navigation, search

This section is about how to serve errors and strategies for debugging.



Dumping variable contents for debugging

If you're trying to debug problems with your template, you might find the Dumper TT plugin useful to peek inside the contents of your variables.

[% USE Dumper %]
[% Dumper.dump(variable) %]

Dumping a variable will output its contents--so, a hash for instance, will have all its keys and values printed.