def debug(context):
from pprint import pformat<EOL>output = [pformat(val) for val in context]<EOL>output.append('<STR_LIT>')<EOL>output.append(pformat(sys.modules))<EOL>return '<STR_LIT>'.join(output)<EOL>
Outputs a whole load of debugging information, including the current
context and imported modules.

Sample usage::

    <pre>
        {% debug %}
    </pre>