Small common lisp library to debug local variables. Solves [No Locals] issue while debugging local variables under SBCL/CCL.
For now it supports local variables defined using:
In your defpackage form add:
(:import-from #:debug-locals #:let #:let* #:multiple-value-bind #:destructuring-bind #:with-debug #:defun*)
Write function using
(defun* foo* () (let ((x 5)) (destructuring-bind (y) '(10) (break) (format t "~d + ~d = ~d" x y (+ x y)))))
with-debug (remember about
(debug 3) declaration):
(defun foo () (declare (optimize (debug 3))) (with-debug (let ((x 5)) (break) (print x))))
You can load examples defined at
(ql:quickload :debug-locals/examples) (in-package :debug-locals)
To see the difference.
Slime backtrace without debug-locals:
Backtrace: 0: (FOO) [No Locals] 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FOO) #<NULL-LEXENV>)
Slime backtrace with debug-locals:
Backtrace: 0: (FOO) Locals: X = 5 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FOO) #<NULL-LEXENV>)