Rather than littering the output with numerous trace comments, it is
much neater to be able to hide these links ???behind??? the visible text, in a similar way to
hyperlinks in HTML.
Debugger As with most development tasks, building a generator is easy until
things go wrong. The fact that generators produce copious output makes their
behavior particularly visible: in a way the generator works like a huge set of
debugging trace output commands. However, in cases where no output is produced
where some was expected, having a true debugger is invaluable.
The debugger should take advantage of its knowledge of the task of the generator,
providing clear visibility not only of the current generator call stack but also of the
position and history of the model navigation, and the current state of the contents of
382 TOOLS FOR DSM
the output or outputs. Normal facilities for stepping through generators, and over or
into called subgenerators, quickly answer most questions about why the generation is
not working as expected.
Being able to place breakpoints in a generator saves time in getting to the offending
point, if that is known. Where the part of the generator is not known, it may be possible
to set a breakpoint on a model element: when the generator navigates to that element in
the model, a break is triggered.
Pages:
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734