Here are some debugging techniques

  • Reduce the specification and the input to localize the error

Format Checking

Unit Testing

  • Write a unit test using StrategoUnit?


  • Print intermediate results using debug

  • Use the debug strategy with an argument. It turns out that the debug strategy will accept a string prefaced by an exclamation mark, thus: debug(!"after doing something or other: ") If you do this, it will print the current aterm as usual, but first it will print the string, so that you know where in the program it is.



  • Compare your code with the list of PitFalls

Revision: r1.6 - 15 May 2003 - 10:40 - MartinBravenboer
Stratego > DebuggingTechniques
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback