Visual Studio Code (VSCode)
note: replace variable starting with $
with actual value
running Live Share on server for collaboration
SSH into server with port forwarding, then run Tmux:
ssh -L $FORWARD_PORT:localhost:$FORWARD_PORT $USER@$SERVER tmux new -s $SESSION_NAME
alternatives to
screen
would workrun Code Tunnels in Tmux on server. needed to get headless VSCode running on server
download vscode cli and install on server: Download Visual Studio Code - Mac, Linux, Windows
start code tunnel on server, log in, etc.
code tunnel
follow instruction, get
$URL
of tunnel
connect to this code tunnel from headless Chrome in Tmux on server, and start Live Share. needed to get persistent session
download chrome and install on server: Google Chrome Web Browser. to do this w/o sudo on debian, only extract the
.deb
to somewhere you own and symlink into local bin onPATH
, something like:mkdir $LOCAL_BIN/chrome dkpg -x $CHROME_DEB $LOCAL_BIN/chrome cd $LOCAL_BIN ln -s chrome/opt/google/chrome/google-chrome google-chrome
start headless Chrome on server:
google-chrome --headless=new --remote-debugging-port=$FORWARD_PORT $URL
connect headless Chrome from local machine with Chrome DevTools remote debugging. open
chrome://inspect/#devices
in local Chromium-based browser, click Configure…, put inlocalhost:$FORWARD_PORT
. wait a bit. tab of$URL
should appear on this page, click inspect below it to directly interact with web VSCode UI tabopen up chrome console and overwrite clipboard. needed to see Live Share link later because DevTools remote clipboard is fake:
_writeText = navigator.clipboard.writeText; navigator.clipboard.writeText = console.log;
start Live Share from UI. open directory in UI, click Live Share button at the bottom to start it, choose log in.
complete login from remote popup tab by going back to
chrome://inspect/#devices
. (wait a bit). find login tab, complete loginget Live Share link. return to UI tab, Live Share should be on, it should say link copied to clipboard (if not, click bottom Live Share button again to copy again). get link in console as printed out
(optional) to manage
Shared Terminals
, in the UI, open theLive Share
panel in the sidebar. needed for participants to use terminaluse the Live Share link yourself and send it to others. you can close your local browser and SSH connection now. the session remains up as long as your Tmux session on the server is up
Enabling discussion for feedback from people trying this out: