VScode Tunnels - Keep it alive

301 views Asked by At

So I have been developing using the vscode.dev remote tunnels - they are great and super convenient. I wanted to know if it is possible to keep it such that the session stays open even when you get disconnected. Such that when I reconnect or reload the window (using the reload window prompt on disconnection) the session continues from where it was left off. I am working in jupyter notebooks and even a slight disconnect results in me losing the progress.

Regards

1

There are 1 answers

0
thou mother On

As far as I am able to tell, VSCode's tunnels use SSH to connect (source), so your goal is to stop the SSH connection from dropping, and the VSCode tunnel session from ending when the SSH connection is briefly disconnected.

Per the visual studio docs on tunnels, you can run: code tunnel service install to run your tunnel as a service, and code tunnel --no-sleep to ensure that your remote tunnel will never go to sleep. Unfortunately, it does not appear as though VSCode offers a tunnels option to stay alive through disconnects.