VS code extension on macos

Now that Juno will not be developed anymore I’m trying to switch to using VS Code (the extension) on VS Code (the editor) (this is why I support renaming the extension :slight_smile: ). I’m trying to follow the tutorial recently featured at JuliaCon, but I can’t get the extension to work as shown.

For example, at the beginning, to start a Julia REPL as in the video, I bring up the Command Palette, and select Julia REPL. The Julia REPL starts but then it immediately changes to a standard terminal.

Also the keyboard shortcut to send the current line to be executed in the REPL do not seem to work. I tried shift + enter, command + enter, control + enter, option + enter.

Finally, I don’t see the Julia Explorer pane being populated with objects. I suppose this will be resolved when I fix the first 2 issues described above.

I’m using Julia 1.5, VS Code (the extension) 1.0.2, and VS Code (the editor) 1.47.3. Perhaps there is very simple solution, but can’t figure it out. I’m new to VS Code (both).

I thought the extension is called Julia (while the repository is named julia-vscode)

now my head is exploding :exploding_head: haha

use ] in the REPL to update your packages. Then try the extension again.

I have tried that, still doesn’t work.

It kinda sounds like you have the wrong path to Julia set (and our error messages in that case being less than ideal). Can you double check that?

1 Like

I didn’t modify anything, so it could be that. However, the indexing of packages completed without no error (is that done by Julia?), I can also see that environment at the bottom left is set to v1.5. One thing is that I also installed VSCodium to bypass having to wait for the indexing when I reinstalled the extension. Could Codium and Code be interfering somehow?

Edit:
Just tried setting the path to /Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia. Still have the same problems.

No, that’s very unlikely. Are you getting a notification when the REPL closes (something along the lines of “Process … exited with status …”)?

no, it just simply closes.

It seems that it exits when it’s idle. I reinstalled the extension again and started the REPL from the command palette. I saw that VSCodeServer was precompiling, and then the REPL closed.

Can you open the Output pane and switch to “Julia Language Server”? That might have some clarifying output.

Oh, also:

  1. Do you have anything in your startup.jl?
  2. Can you try disabling the “Use Revise” setting?

This is the Output pane (in Codium, Code is still indexing)

[ Info: Starting the Julia Language Server
[ Info: Symbol server store is at '/Users/amrods/Library/Application Support/VSCodium/User/globalStorage/julialang.language-julia/symbolstorev2'.
┌ Warning: IntelOpenMP_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: MKL_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: GPUArrays not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: SafeTestsets not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: GenericLinearAlgebra not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: InplaceOps not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: MLDataUtils not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: CMakeWrapper not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: MeshIO not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Xorg_libxcb_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Xorg_xtrans_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Vinyl not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: SweepOperator not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Xorg_xkbcomp_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Wayland_protocols_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: at_spi2_core_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Graphene_jll not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Literate not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: TestImages not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: WinReg not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: CommonSolve not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: CutPruners not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: FoldingTrees not stored on disc
└ @ SymbolServer ~/.vscode-oss/extensions/julialang.language-julia-1.0.2/scripts/packages/SymbolServer/src/SymbolServer.jl:190
[ Info: Received new data from Julia Symbol Server.
  1. I don’t think I have modified startup.jl, in fact I can’t find it.
  2. That worked!

I can now use the keyboard shortcuts and the Julia Explorer is displaying objects.

Sounds like https://github.com/timholy/Revise.jl/issues/519 then.

for some reason I have Revise v1.0.3, not the latest. Some other package is preventing it from upgrading. I’ll have to solve that.

Thanks mate.

Let me just hijack this to ask a simple question. How do I run the entire contents of a .jl file?

Ideally, with the Julia: Execute File command.

Got it. The play button at the top right seems to start the debugger even though the label says “Run Julia file”.

It doesn’t really, it just looks like it, IIRC. Should be equivalent to includeing the file.