| |||||||||||
| MINERVA provides a simple debugging tool to allow you to step through your program and watch it working. It also allows you to execte your program until a specified breakpoint condition.
PreparationTo compile a program for later execution with or without the debugger invoke minervac with the "-debug" option:
minervac -debug myNewProg You can combine objects compiled with the -debug option with already existing program components.
InvokationTo invoke the degugger on a program you use the command line minervad: minervad myNewProg To invoke the debugger on a goal you use the predicate debug/1:
someGoal(Args,..) :- subGoal1(A), subGoal2(B), : debug(subGoal(K)), % debugger will show this : subGoalN(Z).
BreakpointsTo request execution to stop at a given condition you use breakpoints. Breakpoints can express conditions on program status and data.
start :-
breakpoint(app/3),
breakif((app(A,B,C) :- C = [c])),
debug(app([1,2], [ b,c], L)).
Interactive ControlTo interactively control operation of the debugger you use:
s)tep single pass n)ext pass over f)ail force 'fail' c)ont continue till next breakpoint b)acktrace show stack backtrace (activation stack) a)bort abort e)scape call 'break/0' h)elp show this help message
| |||||||||||
| |||||||||||
| Back> |
|