Could not start the julia language server in VS Code
Asked Answered
I

7

18

I'm getting this error in VS Code:

Could not start the julia language server. Make sure the configuration setting julia.executablePath points to the julia binary.

In user settings I put

"julia.executablePath": "c:\\Program Files\\Julia\\Julia-0.5.0\\bin\\julia.exe"

which is a correct executable path.

Julia works without a problem in console and VS Code worked fine with older extension 0.4.2. I've tried reinstalling both the extension and VS Code, but it didn't help.

What am I doing wrong?

Internist answered 8/12, 2016 at 14:34 Comment(0)
P
6

VS Code settings don't seem to always play nice with backslashes. Try instead single slashes, even on Windows:

"julia.executablePath": "c:/Program Files/Julia/Julia-0.5.0/bin/julia.exe"

It may, however, also be a problem with the blank in 'Program Files', in which case the legacy 8.3 filename convention could work:

"julia.executablePath": "c:/PROGRA~1/Julia/Julia-0.5.0/bin/julia.exe"

Note that you would typically have both 'C:\PROGRA~1' and 'C:\PROGRA~2' pointing to 'C:\Program Files' and 'C:\Program Files (x86)', respectively. Find the correct one from the console.

Perea answered 8/12, 2016 at 20:30 Comment(1)
This still doesn't solve it for me. Here's what I wrote for the path: C:/Users/username/AppData/Local/Julia-1.0.0/bin/julia.exeNylanylghau
D
10

I had the same problem, just run Julia REPL and switch to pkg mode with ] and add LanguageServer package with add LanguageServer and restart vs code.

Dmitri answered 3/1, 2021 at 18:44 Comment(0)
A
8

Have a look if the 'LanguageServer' package is actually installed/somehow uninstalled, this happened to me. After manually installing it, it was all fine and dandy again.

Indexing all the packages still takes ages, though.

enter image description here

Agneta answered 28/4, 2020 at 13:57 Comment(1)
For any julia newbies like me reading this, enter ] to enter package mode (see docs.julialang.org/en/v1/stdlib/Pkg)Doodle
P
6

VS Code settings don't seem to always play nice with backslashes. Try instead single slashes, even on Windows:

"julia.executablePath": "c:/Program Files/Julia/Julia-0.5.0/bin/julia.exe"

It may, however, also be a problem with the blank in 'Program Files', in which case the legacy 8.3 filename convention could work:

"julia.executablePath": "c:/PROGRA~1/Julia/Julia-0.5.0/bin/julia.exe"

Note that you would typically have both 'C:\PROGRA~1' and 'C:\PROGRA~2' pointing to 'C:\Program Files' and 'C:\Program Files (x86)', respectively. Find the correct one from the console.

Perea answered 8/12, 2016 at 20:30 Comment(1)
This still doesn't solve it for me. Here's what I wrote for the path: C:/Users/username/AppData/Local/Julia-1.0.0/bin/julia.exeNylanylghau
A
3

https://github.com/JuliaEditorSupport/julia-vscode/issues/405

This can happen if the VS Code extension doesn't support the current version of Julia.

Arhna answered 31/10, 2018 at 17:8 Comment(0)
U
0

Also check that the path is pointing to the julia.exe executable inside the bin folder.

C:\Users\yourname\AppData\Local\Julia-0.5.0\bin\julia.exe

because there is also another one that doesn't work.

C:\Users\yourname\AppData\Local\Julia-0.5.0\julia.exe

Ulani answered 17/10, 2017 at 19:59 Comment(0)
L
0

Reinstalling Julia solved this for me, I tried the previous answers

Lipinski answered 8/9, 2019 at 15:22 Comment(0)
L
0

It is probably due to a SysImage you have compiled and replaced the original sys.dll file with that. Try to check the path C:\Users\User\AppData\Local\Programs\Julia-1.7.3\lib\julia or any other path you have installed Julia and see if a sys.dll.backup exists there, together with a sys.dll file. Rename the sys.dll to sys.dll.old and rename the sys.dll.backup to sys.dll. Then restart julia or VS Code.

Lockjaw answered 25/8, 2022 at 16:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.