VScode error: Cannot read property 'file' of undefined

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?

2 Likes

Can you add a screenshot ? Also, does this persist after closing and re-opening VSCode?

I am having same problem.Here is the screenshot.

1 Like

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.


This is the screenshot. Yes, it persist after closing and re-opening VSCode.

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!

5 Likes

On Windows, adding the .exe solved it for me

1 Like