VSCode vs Intellij Julia support

I’ve started using Intellij with the Julia plugin 0.4.2, and it’s missing important functionality. Progress on that plugin has been slow and it looks like JetBrains doesn’t really care about it.

The good news is that the code completion, syntax highlighting, and indentation all work. The bad news is that the debugger doesn’t work and plotting while running from within Intellij isn’t supported even if I use the -i Program Argument. I can get plotting by running my code in a terminal in Intellij with “julia -i mycode.jl” so that is only a minor issue. But not having the debugger is a serious miss.

I use Intellij all the time for other languages and so I want to use it for Julia. But at some point I’m really going to want a good debugger. Does the debugger and plotting work in VSCode?

Is the Julia support in VSCode complete, or are there large gaps of missing functionality?

3 Likes

Sometimes vscode shows invalid warnings, in particular if you use macros like with Jump.
And it also often does not find symbols in local, unpublished packages.
Otherwise it works fine.

For details, see: Issues · julia-vscode/julia-vscode · GitHub

1 Like

Like you, I use jetbrains for several other languages and would like to use it for julia too. Unfortunately, the jetbrains plugin has been abanded https://github.com/JuliaEditorSupport/julia-intellij/issues/671. There used to be a feature request at jetbrains to add support for julia but it seems to have disappeared.

VSCode is the only option. Debugging is so slow as to unusable in most real world scenarios. You can search the forums here for this issue. It seems to be intrinsic to the way the language works and might be why jetbrains are not interested in supporting it. The intellisense in VSCode is also very unrealiable: https://discourse.julialang.org/t/go-to-definition-almost-never-works/95363/9.

It’s a pity, I really like the language, and so many fantastic packages, but the tooling really lets it down.

2 Likes

I use VSCode exclusively for Julia programming and think it’s quite a decent programming environment. For me Intellisense works well most of the time. The debugger is slow but not so slow as to be useless, at least for the programs I write. I use it all the time.

Jetbrains’ plugin being abandoned doesn’t seem like a problem. I can understand you wanting the capabilities it provides, for other languages, but it likely did not nor likely ever will be better than the VS Code Julia plugin (or first to solve the problem). Java doesn’t have macros, where IntelliJ works well, is it worse for many other languages (maybe with because of macros)?

FYI: I think “go to definition” works most of the time, i.e. when it is simple to determine, or actually when there is a place to go to. Since Julia has macros, you can make code at runtime, and then there is no place to go to… or at best where the macro is applied, and such code isn’t always very obvious. Maybe there are more reasons this doesn’t always work well, @essenciary I recall in Genie code-base a problem when I tried (was it pre-1.0 so very old, or Stipple? Not sure if changed by now). My point is it could differ much by code base. I have high confidence, if this is solvable then first done in Julia REPL, then VS Code. Maybe it’s not and people need to avoid some code patterns, or document well; elsewhere? I’m not sure what to recommend, maybe AI tools will also help more in the future.

I think one problem is that there is currently only one active developer of the vscode Julia plugin. We should find a way to involve more people in this project, but I have no good idea in the moment how. Well, one idea would be to document the interface to the linter well and develop the linter as a separate project…

1 Like

Hmm, that’s a bit of a worry. I see there are >800 open issues and >30 pending PRs on the vscode repo.

Anybody know why the Julia VSCode debugger is so utterly abysmal?

No disrespect to the devs, much of the extension is quite excellent. But you’d think improving the integrated debugger would be a top priority for a language extension, but it hasn’t changed at all in the 1.5 years I’ve tried using it for Julia

Calling it “utterly abysmal” seems a bit harsh, I use it every now and then and while it is rather basic I can still get quite a lot of use out of it.

If you want a change it is maybe more productive to suggest some features you would specifically want, or even better try to contribute those features if you have time and knowledge since, as mentioned, there aren’t too many active developers for the extension right now.

1 Like

Which parts are you unhappy with? Is it functionality or performance? If it’s the latter, have you made sure to select which parts of the codebase should be compiled?

1 Like

Apologies, didn’t mean to sound so hyperbolic; debugger had just crashed on me several times shortly before posting that.

The feature set seems quite adequate, and I like the compile mode integration. Mainly just think stability and responsiveness could use some work.

One feature that would be nice is a visual indication for when a line is being interpreted, or even just that the debugger is not stalled… sometimes I’ll try to step over or into a function call and be unsure if that call is just slow or if the entire debugger has crashed.

3 Likes

I’d love to dive in with Julia, and the more I look at the language, the more I like it. But I keep checking back for a decent IDE with something like Pycharm CE quality, and it seems we are still a ways off, so I’ll have to stick with Python for modeling.

I’ll bet that when the IDE situation and package availability mature, there are LOTS of people out there like me who will dive in.

1 Like