[top] [up] [next]
Debugging tips
Debugging is a very important part of developing programs and becomes a difficult task
if the program being debugged is large and complex. Here are some tips which may help you
with debugging:
- Try to write small procedures and test them immediately if possible. Working with small
increments reduces complexity.
- Inspect the values of variables while debugging
by using watches or moving the mouse over them.
- Breakpoints are very useful for debugging large programs, you can set breakpoints on a line in the source but also on a certain state of the
inference engine in combination with a predicate
indicator of a user-defined procedure.
- Having predicates that help you with debugging a program require effort to create and
maintain but they are worth it. Writing data to the text console
window is often useful.
- The reserved variable names __FILE__, __LINE__
and __MODULE__ can give information about the location of source
code in a project.
[top] [up] [next]
info@trinc-prolog.com