editors

Discussion about all editors used for Clojure/ClojureScript
shooodooken 2018-05-03T13:30:33.000532Z

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.

pez 2018-05-03T14:23:02.000560Z

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.

pez 2018-05-03T14:24:51.000356Z

(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.)

dominicm 2018-05-03T14:30:24.000704Z

@pez I'm curious, how does this work (with cider?)

pez 2018-05-03T14:31:32.000355Z

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)

pez 2018-05-03T14:32:41.000558Z

@dominicm The debugging? No, it's only using the VS Code built in Javascript debugger.

pez 2018-05-03T14:35:40.000747Z

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.

dominicm 2018-05-03T14:36:01.000452Z

ah, a shame, I was hoping to look into re-using it

pez 2018-05-03T14:36:14.000797Z

For which project?

dominicm 2018-05-03T14:36:39.000390Z

vim

pez 2018-05-03T14:38:53.000387Z

Are there any plugins for vim that attach to javascript or java debuggers? Then maybe you can reuse the idea.

dominicm 2018-05-03T14:39:40.000894Z

I don't know, I haven't looked into that, I don't think there's many debuggers for vim generally

pez 2018-05-03T14:39:48.000259Z

I will probably end up using Cider's debug infra, at least for Java projects, some day.

dominicm 2018-05-03T14:40:33.000884Z

yeah, I want to figure out the cider debug infra at some point.

pez 2018-05-03T14:41:11.000573Z

We have started to port Calva to be written in Clojurescript, that's why I started to look into debugging help with that.

pez 2018-05-03T14:43:41.000815Z

There is a VS Code extension for Clojure that I think uses Cider for debugging.

pez 2018-05-03T14:46:03.000423Z

This one: https://github.com/indiejames/vscode-clojure-debug

Shantanu Kumar 2018-05-03T16:13:03.000577Z

Today I learned that Micro has Clojure syntax support: https://micro-editor.github.io/