I often find myself wanting to use break for debugging, but making a good and understandable breakpoint takes:
Listing the name of the function/methos/flet this break belongs to.
Listing an event that triggered it.
And tying in the variables that matter.
While it all is accessible in the debugger opening for break, some more immediate info won't hurt. So the intuition for break* possible use:
;; Logging the function and args automatically:
(break "Function (~s ~{~s^ ~})." 'fn '(foo 37 a))
(break*) ;; Implying function name and args.
;; Listing the value for variable:
(break "Value for ~a is ~s" 'v v)
(break* :var v)
;; Listing data and a provided message.
(break "Function (~s ~{~s^ ~}): Message." 'fn '(foo 37 a))
(break* "Message.")
Ways to get the current stack frame (mostly from Dissect):
I often find myself wanting to use
break
for debugging, but making a good and understandable breakpoint takes:flet
thisbreak
belongs to.While it all is accessible in the debugger opening for
break
, some more immediate info won't hurt. So the intuition forbreak*
possible use:Ways to get the current stack frame (mostly from Dissect):
(sys:frame-to-list (cadr (sys:backtrace)))