You can also easily debug templates, when you using Chameleon (five.pt) as TAL engine:
< tal:something >
<?python import ipdb; ipdb.set_trace() ?>
< /tal:something >
In console you just write
ipdb> pp econtext to get the current local variables. (Note: In some template bindings it's
rcontext.) Other than that, I can suggest to exploit the new commands of ipdb such as
pinfo to display information about an object (docstring, signature, path to source, etc.).