Matomin
Matomin

Reputation: 183

Could not start the julia language server in VS Code

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?

Upvotes: 18

Views: 20348

Answers (7)

Amir Ekrami
Amir Ekrami

Reputation: 1

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.

Upvotes: 0

aliwimo
aliwimo

Reputation: 182

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.

Upvotes: 10

Hansang
Hansang

Reputation: 1622

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

Upvotes: 8

Oliver Rutving
Oliver Rutving

Reputation: 1

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

Upvotes: 0

Nick Bauer
Nick Bauer

Reputation: 1072

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

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

Upvotes: 3

skan
skan

Reputation: 7760

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

Upvotes: 0

m-j-w
m-j-w

Reputation: 272

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.

Upvotes: 6

Related Questions