Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### New features

* [#2828](https://github.com/clojure-emacs/cider/pull/2828): Bind "L" to toggle display of locals during a debug session.
* [#2800](https://github.com/clojure-emacs/cider/pull/2800): Add support for force-out debugger command.

### Changes
Expand Down
15 changes: 9 additions & 6 deletions cider-debug.el
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,15 @@ of `cider-interactive-eval' in debug sessions."
(tool-bar-add-item "exit" #'cider-debug-mode-send-reply :quit :label "Quit")
tool-bar-map))

(defvar cider--debug-mode-map)
(defvar cider--debug-mode-map
(let ((map (make-sparse-keymap)))
;; Bind the `:here` command to both h and H, because it behaves differently
;; if invoked with an uppercase letter.
(define-key map "h" #'cider-debug-move-here)
(define-key map "H" #'cider-debug-move-here)
(define-key map "L" #'cider-debug-toggle-locals)
map)
"The active keymap during a debugging session.")

(define-minor-mode cider--debug-mode
"Mode active during debug sessions.
Expand Down Expand Up @@ -382,11 +390,6 @@ In order to work properly, this mode must be activated by
(when nrepl-ongoing-sync-request
(ignore-errors (exit-recursive-edit)))))

;;; Bind the `:here` command to both h and H, because it behaves differently if
;;; invoked with an uppercase letter.
(define-key cider--debug-mode-map "h" #'cider-debug-move-here)
(define-key cider--debug-mode-map "H" #'cider-debug-move-here)

(defun cider--debug-remove-overlays (&optional buffer)
"Remove CIDER debug overlays from BUFFER if variable `cider--debug-mode' is nil."
(when (or (not buffer) (buffer-live-p buffer))
Expand Down
3 changes: 3 additions & 0 deletions doc/modules/ROOT/pages/debugging/debugger.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ keys, although there are some differences.
| kbd:[l]
| Inspect local variables

| kbd:[L]
| Toggle display of local variables

| kbd:[j]
| Inject a value into running code

Expand Down