Fork me on GitHub
#cider
<
2023-02-27
>
danielneal16:02:02

heya, is there a way, while debugging, of capturing the result of the current expression? i.e. I can press p to inspect, is there a way of capturing it to a var without introducing an extra binding in the expression

Carsten Behring16:02:48

Are you looking for *inspect*-def-current-value ?

danielneal16:02:26

YES! Thanks, and it’s bound to d, score! 🙂

jumar18:02:35

The trouble I had with this feature when I tried to use it a few times was that it used the default project namespace for the var instead of the current namespace and never really worked for me well

iarenaza09:03:19

@U06BE1L6T If you call it interactively, it uses the current namespace (since at least CIDER 1.2.0, maybe even earlier): https://github.com/clojure-emacs/cider/blob/master/cider-inspector.el#L282-L284