Julia vscode lose connection to REPL after a while

I am doing everything on my laptop with Julia+VSCode. Everything worked well until recently (maybe from 5 days before).

By pressing Shift+Enter, it automatically opens a REPL at the bottom, and the left Julia panel shows the modules and global variables. The calculation results are also shown after the code lines. For example,

In the past, I could just leave it there, do other things, even hibernate my win11 system, and come back after a day to continue working on the code. But, recently, it turns out that it will automatically stop working after a while. The REPL still exists, but the left Julia panel shows no global variables, and the previous calculation results after the code lines also disappear.


And if I try to calculate something, it will open a new REPL, and it cannot find the previous global variables.

But if I go back to the previous REPL, it still works.

It turns out the previous process still exists, but I can only contact it through REPL. The vscode loses connection to it, and all the code will be executed in a new Julia process.

These things have been happening frequently in recent days. I have to restart my code for every 30 minutes approximately, and it sometimes happens even when the code is in running. It’s very annoying. Similar things also happen when using Jupyter notebooks. It just suddenly cannot recognize the global variables, and then I know I have to restart it.

How did you install julia?

Also have you tried things like using a different julia version or uninstalling then reinstalling the vscode extension?

I too have this same issue, on both home and work computers.

In VS Code I do a bunch of work but then stop for a bit. Maybe get a coffee, or switch to another task on my PC (responding to email, etc).

If I come back to VS Code and try resuming work (eg ctrl-enter a line from editor to REPL), I get a new REPL and everything from using onwards has to be re-done.

This has only been an issue for the last few days.

I install Julia using juliaup. Both machines are Win11

I just use juliaup for Windows, the official distribution.
I used VSCode insider. I tried to uninstall and reinstall it. No help.
But I have now switched to the non-insider VSCode, and I no longer have this problem.

1 Like

I’m not knowingly using the insider build:

“4 days ago” may correspond with the start of this problem, so maybe something silently went wrong with the most recent version upgrade…