OSC / bc_osc_codeserver

BETA - Batch Connect - OSC Code Server
https://osc.github.io/Open-OnDemand/
GNU General Public License v3.0
18 stars 21 forks source link

How to connect to a VSCode server instance from a local IDE? #13

Closed amirj closed 3 years ago

amirj commented 4 years ago

I can instantiate a VSCode server and connect to it in the browser. Is it possible to connect the local VSCode to that server? -coding in the browser is not convenient and I prefer to use a local IDE with global configs.

msquee commented 4 years ago

@amirj You'll want to use Microsoft's native SSH plugin that they provide for VSCode and start a session on your login nodes. I use this all the time and it's pretty great. You can find instructions on how to use the plugin here: https://code.visualstudio.com/docs/remote/ssh

amirj commented 4 years ago

Thanks @msquee Based on the provided plugin I can connect to the head/login node in the cluster. I want to directly connect to the VSCode server instead of the login/head node. Is there any way to find the address of the initialized VSCode server?

msquee commented 4 years ago

@amirj This is a great question, though I'm not sure if its possible to connect to a remote VSCode instance from the native VSCode client.

To find the address of the initialized VSCode server look at the bottom left of the IDE in browser: image

In this instance, p1001.ten.osc.edu:44988 is the address. Code Server is started with authentication, you can find the password in the staged session folder by clicking on the Session ID in the interactive sessions list: image

and look at output.log in the staged session folder to find the password for the running Code Server instance.