2006-03-13 · in Ideas · 139 words

For people learning to program, it might be useful to have a tool that will trace through their program as it runs printing things like:

101: Variable x of type int declared
102: Variable x set to 4
103: Condition x > 0 is true, doing while loop body
104: Method frob(1, 2, 3) on object foo called
105: Variable x decremented
103: Condition x > 0 is true, doing while loop body ...

Often beginners are confused about what the actual effect of something they've written is; this might help them a bit. (Or it might just make them reliant on the tool, rather than encouraging them to understand what's actually going on.)

Piet Delport noted that the Subtext system and, specifically, the Example Centric Programming project do something very similar to this, with a neat tree-based visualisation of program flow.