
debug

   Execute subsequent top-level queries with the debugger on.



Arguments

Type
   Debugging

Description
   If the debugger is already on, no effect.  If not, the debugger
   will be switched on at the next top-level query.  The debugger will
   stay on until it is switched off with notrace/0.


   The debugger will stop at the first traceable port.


   This is not actually a predicate but a toplevel-command.


Modes and Determinism
   debug is det

Examples
   
[eclipse 1]: [user].
p :- true, writeln(hello).
user       compiled traceable 68 bytes in 0.00 seconds

Yes (0.01s cpu)

[eclipse 2]: spy writeln/1.
spypoint added to sepia_kernel:writeln/1.
Debugger switched on - leap mode
Yes (0.00s cpu)

[eclipse 3]: trace.
Debugger switched on - creep mode

[eclipse 4]: p.
  (1) 1 CALL  p   %> creep
S+(2) 2 CALL  writeln(hello)   %> creep
hello
S+(2) 2 EXIT  writeln(hello)   %> creep
  (1) 1 EXIT  p   %> creep
Yes (0.00s cpu)

[eclipse 5]: debug.
Debugger switched on - leap mode

[eclipse 9]: p.
S+(2) 2 CALL  writeln(hello)   %> creep
hello
S+(2) 2 EXIT  writeln(hello)   %> creep
  (1) 1 EXIT  p   %> creep
Yes (0.00s cpu)


See Also
   notrace / 0, trace / 0, trace / 1, debug / 1
