I am a new user struggling to make Julia work as intended.
I have installed Julia and VS Code on to my Win10 laptop.
I found winget won’t work - message is that it won’t run, although I can find it at multiple places on my C: drive.
So I tried to load the MSIX installer as recommended on the Julia site. No good, it downloads a small file which won’t execute, and when I inspect header with a hex editor, it says it is for OSX, not Windows. I checked carefully to make sure I didn’t click the wrong link.
So finally I downloaded the least-recommended option, the .EXE installer (currently for 1.11.6).
OK, that runs, and I install Julia.
Then I installed VS Code with its standard .EXE installer.
These two installations were initially into a custom area, as I do with all non-system apps.
Next I ran VSCode and installed Julia and Julia Formatter in VSCode.
At this point, I can use Julia, but not without problems. These are:
Problem 1 (minor):
When VSCode starts up, it opens at a Powershell prompt in the Terminal window. I have read this should not happen, and it is a non-standard way to start Julia. To go any further, I have to type julia at the PS prompt. Julia does open without any further trouble.
Problem 2 (major):
When I edit a source file then press the Run triangle (“Julia Execute active File in REPL”), I get an error message (plus a stack trace):
ERROR: LoadError: ArgumentError: Package VSCodeServer not found in current path.
Run `import Pkg; Pkg.add("VSCodeServer")` to install the VSCodeServer package.
So I do as requested, and get this error message (plus a stack trace):
julia> import Pkg; Pkg.add("VSCodeServer")
ERROR: ArgumentError: Package Pkg not found in current path.
I couildn’t find any path errors in the VSCode settings or in my environment variables.
At this stage, Julia works interactively, but if I edit a source file, the only way it will run is to manually save it, then include it at the REPL prompt before running it. It’s a pain in the bum to have to do this after every tiny change to the source file.
So, I uninstalled Julia and VSCode and made an attempt to clean up the typical mess that programs leave these days. After uninstalling via the Control Panel, I manually deleted the installation directories and manually searched the registry to remove all relevant non-encrypted data that I could find, related to these two programs. Then I did a totally standard re-installation at the default installation sites for both programs.
Result: no improvement.
What’s worse, there are settings that survived my clean-up attempts. The command history is stored in a Powershell folder, probably of no significance here, but I deleted it. Worse, the path to the Julia executable in VSCode still points at the first installation site, despite a completely clean re-install. I don’t know where VSCode has been hiding this information; I couldn’t find it in the Windows registry, & all files I could find that were part of the first installation had been deleted.
So - sigh - I put the correct path into VSCode JSON (at julia.executablePath and julia.languageServerExecutablePath), then Julia will run again. BUT, no improvement with the failure of the Run button to work as advertised.
I see from searching the Julia Discourse site that problems with VSCodeServer are not new, but I don’t know why I get it. As far as I can tell from the MS VS site, it is to enable code to be run on a remote platform, and I didn’t indicate at any time that I wanted to do that. I want to run VS & Julia entirely off-line, with all files needed to run them stored locally.
I don’t know where to go from here: any suggestions gratefully received.