Skip to content

Instantly share code, notes, and snippets.

@kisp
Last active May 26, 2024 10:27
Show Gist options
  • Save kisp/255aa151ccef7414ef9ea1385f4da1bc to your computer and use it in GitHub Desktop.
Save kisp/255aa151ccef7414ef9ea1385f4da1bc to your computer and use it in GitHub Desktop.
SBCL break into debugger giving a REPL even if the debugger was previously disabled
(restart-case
(progn
(setq sb-ext:*invoke-debugger-hook* nil
cl:*debugger-hook* nil)
(break "~S" variable-of-interest)) ;or just (break)
(exit ()
:report (lambda (stream) (format stream "Exit with (sb-ext:exit)"))
(sb-ext:exit)))
;; Or, simply
(setq sb-ext:*invoke-debugger-hook* nil
cl:*debugger-hook* nil)
(setq sb-ext:*evaluator-mode* :compile)
(declaim (optimize safety debug))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment