[gambit-list] Debugging techniques
Bradley Lucier
lucier at math.purdue.edu
Fri Oct 7 09:18:45 EDT 2016
What I try to do is debug the code in the interpreter and set
> (generate-proper-tail-calls #f)
Then you'll find, e.g.,
> (define (f n)
(if (= n 0)
(/ 1 n)
(f (- n 1))))
> (f 5)
*** ERROR IN f, (console)@11.7 -- Divide by zero
(/ 1 0)
1> ,b
0 f
(console)@11:7 (/ 1 n)
1 f
(console)@12:7 (f (- n 1))
2 f
(console)@12:7 (f (- n 1))
3 f
(console)@12:7 (f (- n 1))
4 f
(console)@12:7 (f (- n 1))
5 f
(console)@12:7 (f (- n 1))
6 (interaction)
(console)@13:1 (f 5)
1>
Brad
More information about the Gambit-list
mailing list