Author(s): A. Ciepielewski, M. Carlsson, T. Chikayama, K. Shen, D. Cabeza, M. Rodriguez.
Version: 1.11#222 (2004/5/24, 13:8:7 CEST)
Version of last change: 1.11#59 (2003/11/26, 3:11:51 CET)
This library implements predicates which are normally used in the interactive top-level shell to debug programs. A subset of them are available in the embeddable debugger.
debugger
):- use_module(library(debugger)).
debugger
)
Usage: debug_module(Module)
Module
(assuming it is loaded in interpreted mode). When issuing this command at the toplevel shell, the compiler is instructed also to set to interpret the loading mode of files defining that module and also to mark it as 'modified' so that (re)loading this file or a main file that uses this module will force it to be reloaded for source-level debugging.
Module
is an atom.
(basic_props:atm/1
)
Usage: nodebug_module(Module)
Module
. When issuing this command at the toplevel shell, the compiler is instructed also to set to compile the loading mode of files defining that module.
Module
is an atom.
(basic_props:atm/1
)
Usage: debug_module_source(Module)
Module
(assuming it is is loaded in source-level debug mode). When issuing this command at the toplevel shell, the compiler is instructed also to set to interpret the loading mode of files defining that module and also to mark it as 'modified' so that (re)loading this file or a main file that uses this module will force it to be reloaded for source-level debugging.
Module
is an atom.
(basic_props:atm/1
)
Usage:
Usage:
Usage:
h
to see the available options).
Usage: spy(PredSpec)
PredSpec
, switching the debugger on if needed. This predicate is defined as a prefix operator by the toplevel.
PredSpec
is a sequence of multpredspec
s.
(basic_props:sequence/2
)
Usage: nospy(PredSpec)
PredSpec
. This predicate is defined as a prefix operator by the toplevel.
PredSpec
is a sequence of multpredspec
s.
(basic_props:sequence/2
)
Usage:
Usage: breakpt(Pred, Src, Ln0, Ln1, Number, RealLine)
Src
between lines Ln0
and Ln1
at the literal corresponding to the Number
'th occurence of (predicate) name Pred
. The pair Ln0
-Ln1
uniquely identifies a program clause and must correspond to the start and end line numbers for the clause. The rest of the arguments provide enough information to be able to locate the exact literal that the RealLine
line refers to. This is normally not issued by users but rather by the
emacs
mode, which automatically computes the different argument after selecting a point in the source file.
Pred
is an atom.
(basic_props:atm/1
)
Src
is a source name.
(streams_basic:sourcename/1
)
Ln0
is an integer.
(basic_props:int/1
)
Ln1
is an integer.
(basic_props:int/1
)
Number
is an integer.
(basic_props:int/1
)
RealLine
is an integer.
(basic_props:int/1
)
Usage: nobreakpt(Pred, Src, Ln0, Ln1, Number, RealLine)
Src
between lines Ln0
and Ln1
at the Number
'th occurence of (predicate) name Pred
(see
breakpt/6
). Also normally used from de
emacs
mode.
Pred
is an atom.
(basic_props:atm/1
)
Src
is a source name.
(streams_basic:sourcename/1
)
Ln0
is an integer.
(basic_props:int/1
)
Ln1
is an integer.
(basic_props:int/1
)
Number
is an integer.
(basic_props:int/1
)
RealLine
is an integer.
(basic_props:int/1
)
Usage:
Usage:
Usage:
Usage: leash(Ports)
Ports
, some of call
, exit
, redo
, fail
. By default, all ports are on leash.
Ports
is a list of port
s.
(basic_props:list/2
)
Usage: maxdepth(MaxDepth)
MaxDepth
. Calls to compiled predicates are not included in the computation of the depth.
MaxDepth
is an integer.
(basic_props:int/1
)
Usage: call_in_module(Module, Predicate)
Predicate
belonging to module Module
, even if that module does not export the predicate. This only works for modules which are in debug (interpreted) mode (i.e., they are not optimized).
Module
is an atom.
(basic_props:atm/1
)
Predicate
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
No further documentation available for this predicate.
debugger
)A property, defined as follows:
multpredspec(Mod:Spec) :- atm(Mod), multpredspec(Spec). multpredspec(Name/Low-High) :- atm(Name), int(Low), int(High). multpredspec(Name/(Low-High)) :- atm(Name), int(Low), int(High). multpredspec(Name/Arity) :- atm(Name), int(Arity). multpredspec(Name) :- atm(Name).
debugger
)Go to the first, previous, next, last section, table of contents.