Hi guys,
I’m using VScode + julia extensions. Normally, when I apply ⇧(shift)+enter on a line of code in a .jl file, it will automatically open a julia REPL. However, today when I do the same thing, it reports an warning:
Cannot read property ‘file’ of undefined
on the bottom right corner of the screen and nothing happens.
I have no idea what I did to cause this problem. How can I fix it?
What do you have under Julia: Executable Path in the settings (Settings → Extensions → Julia)?
I had this issue previously because I had an invalid path there.
Problem solved by changing the Executable Path from “/home/software/julia-1.6.4/bin” to “/home/software/julia-1.6.4/bin/julia”
Thank you!
Hello all, I had a hard time solving the same problem. The difference from
@Sharon-Liang
's is that I am running VS code from a workstation and do “Remote-SSH Connect to Host…” to connect to another remoter server. VS code and Julia can run well with ⇧(shift)+enter at local workstation. But it doesn’t work for the remote server where I have to run include(“test.jl”) to run the code.
In both case, it is blank in Julia: Executable Path in the settings (Settings → Extensions → Julia). And even if I entered /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia to the server setting, it doesn’t help.
The /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia is actually the path for local workstation. In the server, I need to do “module load” to load julia/1.7.2.
Thank you for your help!
@logankilpatrick
@hdavid16
You choud use:
whereis julia
to find its location, and fill it in the Julia:Executable Path.
For example, the Executable Path of Julia in my remote server is “/cm/shared/apps/julia-1.7.1/bin/julia”.
Hope it helps
Shuang(Sharon)-Liang
Institute of Physics, CAS
[email protected]
](
头像签名
)
---- Replied Message ----
From |
Si Chen via JuliaLang
[email protected]
|
| - |
Date | 07/01/2022 05:20 |
To |
[email protected]
[email protected]
|
Cc | |
Subject | [JuliaLang] VScode error: Cannot read property ‘file’ of undefined |
|
Si_Chen
June 30 |
| - |
Hello all, I had a hard time solving the same problem. The difference from
@Sharon-Liang
's is that I am running VS code from a workstation and do “Remote-SSH Connect to Host…” to connect to another remoter server. VS code and Julia can run well with ⇧(shift)+enter at local workstation. But it doesn’t work for the remote server where I have to run include(“test.jl”) to run the code.
In both case, it is blank in Julia: Executable Path in the settings (Settings → Extensions → Julia). And even if I entered /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia to the server setting, it doesn’t help.
The /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia is actually the path for local workstation. In the server, I need to do “module load” to load julia/1.7.2.
Thank you for your help!
@logankilpatrick
@hdavid16
Thank you
@Sharon-Liang
for your help!
whereis julia
is working great to solve my problem!
Best,