I just found out Calva has a debugger which feels almost life changing 😃. I do not however see that a function that I instrument with alt+ctrl+c i is showing the horizontal bars to indicate that the function is instrumented. The debugger is working fine, its just the visual indication on the instrumented function that is not showing. Is there maybe something that I need to configure to get the visual indicators?
It’s glitchy for unknown reasons. Sometimes I see it. Sometimes not. You are welcome to file an issue. Have you tried to evaluate debugged code while stepping in the debugger? It’s pretty powerful!
Ooo, that is nice! I just tried out evaluating expressions in the context of a break point. Thank you so much for adding that.
It’s good to know that this binding is really in “the context of the breakpoint” and not limited to the lexical scope. So you can have a Rich comment form below the function you are debugging and write and evaluate any code that uses the captured bindings.
I noticed the call stack had only one entry. Is that expected?
Never mind. I see there is a note about that in the documentation.
Yes. I’ve spent some considerable time trying to fix that but I failed.
I finally managed to get the VS Code team to see the issue with semantic tokens that risks breaking so many VS Code editing session if it reaches stable. They have this PM, Isodor Nikolic, who us really responsive. Aaaaand the attention had them update the issue with the info that it is now fixed. 🎉
Missed your message there, will check tomorrow!
It should be fixed in latest Insiders. Can you try your repro, @thierry572? It stopped reproducing for me for some reason. Maybe I happened to get an updated Insiders in while trying….
Though report about that the issue is not fully fix just came in: https://github.com/microsoft/vscode/issues/243923#issuecomment-2761314682 I suspected as much as @thierry572 could repro just the other day. (Even with “fixed” Calva, so I think there is more to this than meets the eye.)
check pm
The VS Code team wants to know what’s in the dev console when this error happens. Can you provide, @thierry572? https://github.com/microsoft/vscode/issues/243923#issuecomment-2782753932
Didnt I already copy paste this before?
I don’t see any logs from you in that issue thread at least. 😃
No I think I pm'd you
Well, that was from a different build of Insiders, I think. They need logs from the latest build.
ah, okay, will have to see if I can reproduce
I will update all to latest version
The version of Calva doesn’t matter here.
Havent seen the issue yet today
I don’t know wether to hope you run in to it or not. 😃
well, I hope not, it's kind of breaking
Havent forgotten you, going to install latest nightly and latest calva now
No issues so far
Aaaaannnd... it's gone
damnit
Thanks. I really wonder what the repro is…
It took a while
but I think it's a lot of
#'namespace/function
in the repl fileIs there a place in the calva config to inject more nrepl middleware? I would like to use flowstorm from calva and have it mostly working, except it needs more nrepl-middleware to get things like evals and *out* and *err* working.
I don’t think we have this. But you can start the repl outside Calva and connect to it. You could use the command Calva: Copy Jack-in Command to Clipboard as a start. And you could also bake that into a custom connect sequence using the custom command line option: https://calva.io/connect-sequences/#custom-command-line
Actually I figured it out from the Calva docs! It's working with a custom deps.edn alias and custom connect sequence. In deps.edn:
{:aliases {:flowstorm {:classpath-overrides {org.clojure/clojure nil}
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-9"}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.2"}}
:jvm-opts [
;; "-Xmx20500m"
;; "-Dflowstorm.theme=dark"
"-Dflowstorm.startRecording=true"
"-Dclojure.storm.intrumentEnable=true"
"-Dclojure.storm.intrumentAutoPrefixes=true"
]}}}
Custom connect sequence:
{
"name": "flowstorm",
"projectType": "deps.edn",
"cljsType": "none",
"extraNReplMiddleware": ["flow-storm.nrepl.middleware/wrap-flow-storm"],
"afterCLJReplJackInCode": "((requiring-resolve 'flow-storm.storm-api/start-debugger))",
"menuSelections": {
"cljAliases": ["flowstorm"]
}
}Yes, I even forgot about that obvious solution. 😃
Wow, I had forgotten about extraNReplMiddleware. That’s what you asked about really. Though I have to say that there was something about the question that made me say “I don’t think we have this” 😃
Yeah it was a needle in a haystack trying to search google for it, I only realized it when I went back and read the entire doc page for custom connect sequences.
It's working perfectly with the custom connect sequence, very happy with the flexibility calva provides for customizing things.