Last active
May 26, 2024 10:27
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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