All Manuals > KnowledgeWorks and Prolog User Guide > 5 The Programming Environment

NextPrevUpTopContentsIndex

5.8 Debugging with the Environment

5.8.1 Spy Windows

Figure 5.10 KnowledgeWorks Gspy Window

Spy Windows display graphically the actions or subgoals a rule (either forward or backward chaining) will invoke when it fires. A Spy Window may be obtained by selecting a rule in the Rule Browser and choosing Rule > Gspy or choosing Gspy from the context menu.or by choosing Spy > Gspy in the KnowledgeWorks Listener. Spying can be cancelled by closing the Spy Window or by choosing Spy > NoSpy or Spy > NoSpy All from the KnowledgeWorks Listener.

Selecting one of the graph nodes in the top pane of the Spy Window displays the full text of the box in the pane below. Choosing Gspy from the context menu brings up a Spy Window for the goal in the box.

When the rule being displayed fires, execution stops and the buttons at the bottom of the KnowledgeWorks Listener allow the rule to be single-stepped. Clicking on the Creep button steps through the rule, and Leap advances to the end of the rule (unless any of the intervening goals invoke another rule which has been spied). When single-stepping, a highlight marks the action or goal being performed. When execution is suspended in this manner, any of the KnowledgeWorks tools or browsers may be used.

More details on single stepping through rules are in Common Prolog.


KnowledgeWorks and Prolog User Guide (Macintosh version) - 24 Mar 2017

NextPrevUpTopContentsIndex