Clean up the debugger menus and fix the force step-out key#4076
Merged
Conversation
The menu-bar menu and the transient menu each spelled out the full list of debugger commands by hand, so they had already drifted: the menu-bar menu advertised the wrong key for inject and was missing step-in, stacktrace and trace. Introduce `cider--debug-commands' as the one place that lists the commands (key, function, label, group) and generate both menus from it, so they can't fall out of sync again.
Pressing `O` in a debug session sent a `:force-out` command, but the middleware has no such command: force-out is `:out` sent with a `force?` flag. The unknown command aborted the session and raised an error. Map the `O` key to the `out` command so the uppercase-key force handling in `cider-debug-mode-send-reply' produces a proper forced `:out`, which matches what the menu and `cider-debug-force-out` already send.
`cider--debug-find-coordinates-for-point' is the inverse of `cider--debug-move-point', but only the latter was covered. Test that feeding the finder's result back into `cider--debug-move-point' lands on the same spot.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pulls together a few debugger fixes and a bit of cleanup.
The menu-bar menu and the transient menu each listed the full set of debugger commands by hand, and they had drifted: the menu-bar menu showed the wrong key for inject (
iinstead ofj) and was missing step-in, stacktrace and trace. Both menus are now generated from a singlecider--debug-commandscatalog, so they stay in sync.While tracing the command dispatch I found that the
O(force step-out) key was broken: it sent a:force-outcommand, which the middleware does not have (force-out is:outwith aforce?flag), so pressing it aborted the session with an error. That is fixed too.Commits:
O(force step-out) key.cider--debug-find-coordinates-for-point, the inverse ofcider--debug-move-point, which had no direct coverage).eldev test,eldev compileand checkdoc are all clean.