VSCode REPL hanging after a while

This just started happening recently. After I use the integrated VSCode repl for a while, it increasingly hangs with this error:
“The connection to the terminal’s pty host process is unresponsive, the terminals may stop working.”
It recovers, but it takes longer and longer to recover until I have to restart it. This was happening with Julia 1.7.1 and I upgraded to 1.7.3 and it still happens.

I recently upgraded to Windows 11, so that could be related. I understand the problem might be with Windows or VSCode, but I thought someone here might know what’s going on or how to investigate.

3 Likes

Do you have a firewall running that might block the communication to the REPL?

Does it also happen if you use the normal VSCode terminal and launch Julia from the
terminal?

1 Like

I just noticed this today too. I am still using Windows 10.

I’ve been using VSCodium and VSCode since at least January 2022, and noticed this too on both versions with the latest upgrade to VSCode (I think it was called the July update).

As a result, I ran my usual work today through the REPL - no problems there.

It wasn’t a problem with either VSCodium or VSCode previously.

I know I’m reaching out about a problem, but thanks to the team for the great work! The VSCode extension makes it really easy to work with Julia.

VSCodium setup:

Version: 1.70.0 (user setup)
Commit: da76f93349a72022ca4670c1b84860304616aaa2
Date: 2022-08-05T01:52:42.266Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19042

VSCode setup:

Version: 1.70.0 (user setup)
Commit: da76f93349a72022ca4670c1b84860304616aaa2
Date: 2022-08-04T04:38:16.462Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19042

Can you try downgrading the extension version to 1.6.28 or 1.6.29, just to confirm that this was caused by us and not the VS Code update?

I switched to Julia extension 1.6.28 and in my initial tests of the REPL, everything seems to be working normally (no hanging or errors). I’ll keep using 1.6.28 to see if I encounter any issues - unfortunately I don’t use Julia all day, but I should have a couple of chances to try it live by the end of the week.

Also if there are specific things that I should try in order to provide more useful information, I’m all ears.

Ok, one more data point would be to try disabling the shell integration (terminal.integrated.shellIntegration.enabled) on the latest release of the extension.

For what its worth, I also had a lag issue that sometimes got so bad it froze vscode (Windows, Julia extension v1.6.30). I downgraded to v1.6.29, and it seems to be better now. Will post back if the problem persists. I am running Julia v.1.8.0-rc4.

OK, switched back to Julia extension v1.6.30 and on initial tests everything seems to be working great. I’ll leave this as-is when I use Julia over the next couple of days and will report back. Thanks!

Thanks for the help here. As for firewall, wouldn’t that cause it to never work as opposed to just gradually stop working over time? (and possibly related to how much was displayed in REPL as when much text is dumped there is when it seems to start having issues).

Does it also happen if you use the normal VSCode terminal and launch Julia from the
terminal?

This is interesting. I tried that yesterday as you suggested. When I ran git bash and Julia from there, I didn’t see the issue. Also, when I ran Julia from the terminal inside VSCode, I didn’t see the issue. So, it seems it was only when I right clicked on a jl file and ran “execute file in repl” which creates a new REPL, that’s when there was a problem.

However, just now I did that, and so far there hasn’t been a problem.
I’m on the 1.6.30 version of the extension.
VSCode:
Version: 1.70.0 (user setup)
Commit: da76f93349a72022ca4670c1b84860304616aaa2
Date: 2022-08-04T04:38:16.462Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.22000

but I don’t know if that changed since yesterday. So… not sure what happened.

Disabling terminal.integrated.shellIntegration.enabled should fix this in the short-term.

2 Likes

I am facing the same issue.Could somebody show how the disabling can be done? Thank in advance.

Go to File > Preferences > Settings (or hit Ctrl+,) and paste the id into the search bar.

1 Like