When developing or debugging Albatross applications, one of the things you need to get right is when variables enter and leave the so-called "local context", and what values they have. Debugging this can be tedious, so I wrote a simple macro that I can call from any template that will show the name and value of all the variables currently in the ctx.locals namespace.
<al-macro name="showcontext"> The current local context is: <ul> <al-for iter="ctxiter" expr="locals().keys()"> <li><al-value expr="ctxiter.value()"> = <al-value expr="locals()[ctxiter.value()]"> </li> </al-for> </ul> </al-macro>