Skip to content

[stacktrace] Allow inspecting ex-data directly #3807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2025

Conversation

alexander-yakushev
Copy link
Member

@alexander-yakushev alexander-yakushev commented Apr 9, 2025

Sister PR: clojure-emacs/cider-nrepl#930
Addresses (partially): #3804.

Here's the end result:
Screenshot 2025-04-09 at 20 11 49
The screenshot doesn't show the mouse cursor, but the printed ex-data is now a clickable button, it gets highlighted on hover, you can click it or press Enter on it or p or i and this will open the inspector showing just the ex-data (not the entire exception).

Whole exceptions are still inspectable by clicking the exception classname or Enter or i or p.

I also shuffled some newlines again to fix minor highlighting issues with the stacktraces.


  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

@alexander-yakushev
Copy link
Member Author

CC @rrudakov @r0man

@r0man
Copy link
Contributor

r0man commented Apr 9, 2025

@alexander-yakushev Nice! Looks exactly what I was looking for. Thank You! I will give it a try tomorrow morning!

Within `*cider-error*`, when clicking directly a top-level exception (any of
them in the cause chain), that specific exception will be inspected with the
CIDER xref:debugging/inspector.adoc[Inspector]. You can also click on the
rendered exception data to inspect it directly.
Copy link
Member

@bbatsov bbatsov Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good a idea to add here a couple of screenshots or some short gif video.

Copy link
Member

@bbatsov bbatsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the changes look good to me.

(interactive)
(cl-assert (numberp index))
(let ((result (cider-sync-request:inspect-last-exception index)))
(let ((result (cider-nrepl-send-sync-request `("op" "inspect-last-exception"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably put a line break before the request list params to narrow the formatting here.

@alexander-yakushev alexander-yakushev force-pushed the inspect-ex-data branch 3 times, most recently from be08c59 to 984dd1f Compare April 10, 2025 08:01
@r0man
Copy link
Contributor

r0man commented Apr 10, 2025

Hi, I just tried it, it works as expected and I like it! Thanks again!

@alexander-yakushev alexander-yakushev merged commit ddfc99b into master Apr 10, 2025
16 checks passed
@alexander-yakushev alexander-yakushev deleted the inspect-ex-data branch April 10, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants