4.39 Debugging and Tracing Programs
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Debugging and Tracing Programs
          • trace/0
          • tracing/0
          • notrace/0
          • trace/1
          • trace/2
          • notrace/1
          • debug/0
          • nodebug/0
          • debugging/0
          • spy/1
          • nospy/1
          • nospyall/0
          • leash/1
          • visible/1
          • unknown/2
          • style_check/1
    • Packages
Availability::- use_module(library(edinburgh)).(can be autoloaded)
Sourcedebug
Start debugger. In debug mode, Prolog stops at spy and break points, disables last-call optimisation and aggressive destruction of choice points to make debugging information accessible. Implemented by the Prolog flag debug.

Note that the min_free parameter of all stacks is enlarged to 8 K cells if debugging is switched off in order to avoid excessive GC. GC complicates tracing because it renames the _<NNN> variables and replaces unreachable variables with the atom <garbage_collected>. Calling nodebug/0 does not reset the initial free-margin because several parts of the top level and debugger disable debugging of system code regions. See also set_prolog_stack/2.