closed above issue https://github.com/PEZ/clojure4vscode/issues/29... my fault. i had forgotten i had added venantius/ultra to my leiningen profile a while ago.
I have released a version of Calva with an experimental feature. It lets you set breakpoints in Clojure(script) files. I can't get the breakpoints to attach if I set them in my source files, but if I set them in generated JS files they do attach and the Code debugger shows the source code, (granted proper source-maps have also been generated). It's clunky, but I'm thinking that maybe someone smarter than I am can figure out how it can be configured to behave better than this.
(For node projects you need to make a task that launches or attaches to a node debug session. For browser project I use the Chrome Debugger extension together with a launch task.)
@pez I'm curious, how does this work (with cider?)
Here's a launch conf for Chrome that works in the clunky way I describe above:
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "<http://localhost:3449>",
"webRoot": "${workspaceFolder}/cljs-resources/public/"
}
(The Figwheel project puts generated JS files in /cljs-resources/public/js/compiled/out
)@dominicm The debugging? No, it's only using the VS Code built in Javascript debugger.
I have also tried to experiment with sourceMapPathOverrides
for the chrome
launch configuration, in hopes that that is a way to make the breakpoints attach from my real source files, but so far no luck with that.
ah, a shame, I was hoping to look into re-using it
For which project?
vim
Are there any plugins for vim that attach to javascript or java debuggers? Then maybe you can reuse the idea.
I don't know, I haven't looked into that, I don't think there's many debuggers for vim generally
I will probably end up using Cider's debug infra, at least for Java projects, some day.
yeah, I want to figure out the cider debug infra at some point.
We have started to port Calva to be written in Clojurescript, that's why I started to look into debugging help with that.
There is a VS Code extension for Clojure that I think uses Cider for debugging.
This one: https://github.com/indiejames/vscode-clojure-debug
Today I learned that Micro has Clojure syntax support: https://micro-editor.github.io/