For example lets say I have the following procedure
(define (delete-adjacent-duplicates lst)
(fold-right (lambda (elem ret)
(if (equal? elem (first ret))
ret
(cons elem ret)))
(list (last lst))
lst))
So when I run the above procedure like (delete-adjacent-duplicates '(1 2 3 3 4 4 4 5))
I want to see how it executes at each step. Also I want to setup breakpoints at certain locations so that the breakpoint fires at those particular points How can I achieve that using GNU Scheme(which is what I am using)? I know Dr.Racket provides debug functionalities but I want to use it from Guile
In documentation, it suggests to use trace
function in the (ice-9 debug)
module. However, that function is deprecated and I don't how to use the newly suggested module (system vm trace)
module. Can anyone give a detailed example how I can debug procedures in Scheme?