A.14 library(debug): Print debug messages and test assertions
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(debug): Print debug messages and test assertions
          • debugging/1
          • debugging/2
          • debug/1
          • nodebug/1
          • list_debug_topics/0
          • debug_message_context/1
          • debug/3
          • debug_print_hook/3
          • assertion/1
          • assertion_failed/2
    • Packages
Availability::- use_module(library(debug)).(can be autoloaded)
Source[det]debug(+Topic)
[det]nodebug(+Topic)
Add/remove a topic from being printed. nodebug(_) removes all topics. Gives a warning if the topic is not defined unless it is used from a directive. The latter allows placing debug topics at the start of a (load-)file without warnings.

For debug/1, Topic can be a term Topic > Out, where Out is either a stream or stream-alias or a filename (atom). This redirects debug information on this topic to the given output.