Function: cider--handle-debug
cider--handle-debug is a byte-compiled function defined in
cider-debug.el.
Signature
(cider--handle-debug RESPONSE)
Documentation
Handle debugging notification.
RESPONSE is a message received from the nrepl describing the input
needed. It is expected to contain at least "key", "input-type", and
"prompt", and possibly other entries depending on the input-type.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-debug.el
(defun cider--handle-debug (response)
"Handle debugging notification.
RESPONSE is a message received from the nrepl describing the input
needed. It is expected to contain at least \"key\", \"input-type\", and
\"prompt\", and possibly other entries depending on the input-type."
(nrepl-dbind-response response (debug-value key input-type prompt inspect caught-msg)
(condition-case-unless-debug e
(progn
(pcase input-type
("expression" (cider-debug-mode-send-reply
(condition-case nil
(cider-read-from-minibuffer
(or prompt "Expression: "))
(quit "nil"))
key))
((pred sequencep)
(let* ((marker (cider--debug-find-source-position response 'create-if-needed)))
(pop-to-buffer (marker-buffer marker))
(goto-char marker))
;; The overlay code relies on window boundaries, but point could have been
;; moved outside the window by some other code. Redisplay here to ensure the
;; visible window includes point.
(redisplay)
;; Remove overlays AFTER redisplaying! Otherwise there's a visible
;; flicker even if we immediately recreate the overlays.
(cider--debug-remove-overlays)
(when cider-debug-use-overlays
(cider--debug-display-result-overlay debug-value caught-msg))
(setq cider--debug-mode-response response)
(cider--debug-mode 1)))
(when inspect
(cider-inspector--render-value inspect :next-inspectable)))
;; If something goes wrong, we send a "quit" or the session hangs.
(error (cider-debug-mode-send-reply ":quit" key)
(message "Error encountered while handling the debug message: %S" e)))))