I should be able to debug my complex QL Expressions
Summary: Intriguing suggestion from Eric: a _debug() function that you can stick into the middle of an expression, which outputs information about the current context.
He points out that this will need an optional label, so that you can sort out which debugging statement comes from where.
He also suggests that, ideally, all the debugs would show up outside the mainly display flow of the page -- in a separate output pane or some such -- to avoid layout Heisenbugs.
Not at all obvious how to work this into the QL processing flow, but it would clearly be very useful. Would almost certainly require complicity in the QLContext data structure, to accumulate the debugging statements. Might also need complicity in QValue itself, so that it could be returned from deeper processing. Might eventually wind up as a special Wikitext div class, which gets intercepted by the UI and floated to the top of the page?