IF Computer > MINERVA > Manual > Reference > Debugger

Debugger

MINERVA
ifcomputer logo
f
Expert Services on the Web

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.

Preparation

To 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.

Invokation

To 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).

Breakpoints

To 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)).

app([],L,L). app([E|L1],L2,[E|L3]) :- app(L1,L2,L3).

Interactive Control

To 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

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Debugger/print_de.html
published 2008/10/6 update 2001/2/13 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS