> On Feb 23, 2017, at 12:04 PM, Mike Gran wrote: > > * Some helper funcs for debugging. For example, I just found > out (after a decade) that Guile comes with its own pk. Also, > a "break REPL here when condition is true" procedure would > be great. I've sometimes rolled my own with ",break acos" and > adding (acos 0.0) for the location in question. > I am playing with this. Now reading through system/repl/* and system/vm/* to understand the debugger. Try (use-modules (system repl repl)) (use-modules (system repl debug)) (define-syntax-rule (trap-here-0) (start-repl #:debug (make-debug (stack->vector (make-stack #t)) 0 "trap!" #t))) (define (foo) (let iter ((sum 0) (vals '(1 2 3 5 8 2))) (trap-here-0) (cond ((null? vals) sum) (else (iter (+ sum (car vals)) (cdr vals)))))) (foo) I have added some debugger commands: ,loc - show current location ,qq - really quit (calls primitive-exit) scheme@(guile-user) [1]> ,loc (let iter ((sum 0) (vals '(1 2 3 5 8 2))) * (trap-here-0) (cond scheme@(guile-user) [1]> ,qq mwette$