I have some experience in using VSCode for Python. Now I tried it with julia (running a simple Hello World -program), but it just gives an error “Could not start the Julia language server. Make sure the julia.executablePath is valid”.
I am using VSCOde for Linux ver. 1.78.2 on Linux Mint 21 and a freshly-installed Julia 1.9.0.
I found some older posts (latest in 2021) about the issue - so far I’ve tried the following:
set the path manually or via Settings (in my case, it’s /usr/local/julia-1.9.0/bin/julia)
start julia REPL, installed packages both using ‘add’ and the package env ]
remove and re-install julia extension on VSCOde
in Terminal, I have a path to julia’s location, so I can just start it by typing ‘julia’.
The easiest would probably be to install julia using juliaup instead, and leaving the julia path setting empty. That should allow the plugin to find the julia installation automatically.
If you don’t want that (or it doesn’t work for you), I would maybe try to just symlink julia to somewhere in the standard PATH. If you add it to your path in e.g. bashrc I don’t think the plugin picks that up.
When you say start a repl, can you do that through the plugin or do you do it manually in the integrated terminal?
I might be worth having a look at the output from the julia extension, and see if there are any helpful errors there. You can find that under the output tab, and selecting julia in the picker.
I am trying juliaup now; the problems don’t disappear but they do change.
Every time I open VSCode, the program spends 1-2 min starting the Language Server
and loading all kinds of cache files, and FAILING:
[
> Info: Downloading caches... (13%)
> Info: Couldn't retrieve cache file for Mmap.
> └ exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/M/Mmap_a63ad114-7e13-5084-954f-fe012c677804/vnothing_nothing.tar.gz
> [ Info: Loading JuliaFormatter from cache... (75%)
>
> [ Info: Loading Glob from cache... (75%)
>
> [ Info: Loading CommonMark from cache... (75%)
>
> [ Info: Loading JSONRPC from cache... (75%)
>
> [ Info: Received new data from Julia Symbol Server.
After ‘finishing’ this work, VSCode is apparently ready for work. However, when I run the program, nothing happens!
* Executing task: /home/mikael/.julia/juliaup/julia-1.9.0+0.x64.linux.gnu/bin/julia --color=yes --startup-file=no --history-file=no --project=/home/mikael/.julia/juliaup/julia-1.9.0+0.x64.linux.gnu/bin/julia /home/mikael/.var/app/com.visualstudio.code/data/vscode/extensions/julialang.language-julia-1.47.2/scripts/debugger/run_debugger.jl /tmp/vsc-jl-dbg-c9bc9c24-ac3f-4326-98d5-0b8814e6c6ca /tmp/vsc-jl-cr-eb418a96-7192-4bd2-a35b-18c077304678
* Terminal will be reused by tasks, press any key to close it.
As I stated earlier, it all works using Linux’s normal terminal; I also tried VSCode’s terminal, but here it gives a “Segmentation fault”.
Yeah, I’m not sure. I used to have some strange problems with the vscode and the language server, but juliaup and empty path in vscode settings solved it for me.
Maybe try to run the language server independently of vscode and see if that behaves well?
I had problems with the language server after a julia update and solved them by starting up a session with a single thread. After that I could start multi-threaded. I recall doing this outside VSCode. The problem was that julia needed to so some updates, and I guess the multiple threads were stepping on each other.
If you installed Julia through the distro’s package manager, maybe try using the tar ball in Download Julia. Unload it your home directory and add it to the Julia extension’s executablePath variable. Also try to install LanguageServer manually, even though it shouldn’t make a difference, sometimes it does.
Same issue here.
Pop!OS, VSCode and Julia installed from the Pop Shop.
I tried removing and installing from the site options (VSCode and Julia), and the Juliaup, but neither works.
The message I receive is:
Error while communicating with the LS.
The REPL loads, but I can’t “send” anything.