You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/access/vscode.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
[](){#ref-access-vscode}
2
-
# Connecting with VSCode
2
+
# Connecting with VS Code
3
3
4
4
[Visual Studio Code](https://code.visualstudio.com/) provides flexible support for remote development.
5
-
VSCode's [remote tunnel feature](https://code.visualstudio.com/docs/remote/tunnels) starts a server on a remote system, and connects the editor to this server.
5
+
VS Code's [remote tunnel feature](https://code.visualstudio.com/docs/remote/tunnels) starts a server on a remote system, and connects the editor to this server.
6
6
There are two ways to set up the connection:
7
7
8
8
* using the code CLI: the most flexible method if using containers or uenv.
9
-
* using the VSCode interface: VSCode will connect onto the system, download and start the server
9
+
* using the VS Code interface: VS Code will connect onto the system, download and start the server
10
10
11
-
The main challenge with using VSCode is that the most convenient method for starting a remote session is to start a remote tunnel from the VS Code GUI.
11
+
The main challenge with using VS Code is that the most convenient method for starting a remote session is to start a remote tunnel from the VS Code GUI.
12
12
This approach starts a session in the standard login environment on that node, however this won't work if you want to be developing in a container, in a uenv, or on a compute node.
13
13
14
14
This process is also demonstrated in a webinar on [Interactive computing on "Alps"](https://www.cscs.ch/publications/tutorials/2025/video-of-the-webinar-interactive-computing-on-alps):
@@ -25,7 +25,7 @@ This process is also demonstrated in a webinar on [Interactive computing on "Alp
25
25
26
26
## Flexible method: remote server
27
27
28
-
The most flexible method for connecting VSCode is to log in to the Alps system, set up your environment (start a container or uenv, start a session on a compute node), and start the remote server in that environment pre-configured.
28
+
The most flexible method for connecting VS Code is to log in to the Alps system, set up your environment (start a container or uenv, start a session on a compute node), and start the remote server in that environment pre-configured.
Give the tunnel a unique name using the `--name` flag, which will later be listed on the VSCode UI.
119
+
Give the tunnel a unique name using the `--name` flag, which will later be listed on the VS Code UI.
120
120
121
121
You will be requested to go to [github.com/login/device](https://github.com/login/device) and enter an 8-digit code.
122
-
Once you have finished registering the service with GitHub, in VSCode on your PC/laptop open the "remote explorer" pane on the left hand side of the main window, and the connection will be visible under REMOTES (TUNNELS/SSH) -> Tunnels.
122
+
Once you have finished registering the service with GitHub, in VS Code on your PC/laptop open the "remote explorer" pane on the left hand side of the main window, and the connection will be visible under REMOTES (TUNNELS/SSH) -> Tunnels.
123
123
124
124
!!! note "First time setting up a remote service"
125
-
If this is the first time you have followed this procedure, you may have to sign in to GitHub in VSCode.
125
+
If this is the first time you have followed this procedure, you may have to sign in to GitHub in VS Code.
126
126
127
127
Click on the Remote Explorer button on the left hand side, and then find the following option:
128
128
@@ -134,12 +134,12 @@ Once you have finished registering the service with GitHub, in VSCode on your PC
134
134
135
135
If you have not signed in to GitHub with VS Code editor, you will be redirected to the browser to sign in.
136
136
137
-
After signing in and authorizing VSCode, the open tunnel should be visible under REMOTES (TUNNELS/SSH) -> Tunnels.
137
+
After signing in and authorizing VS Code, the open tunnel should be visible under REMOTES (TUNNELS/SSH) -> Tunnels.
138
138
139
139
[](){#ref-vscode-uenv}
140
140
### Using with uenv
141
141
142
-
To use a uenv with VSCode, the uenv must be started before calling `code tunnel`.
142
+
To use a uenv with VS Code, the uenv must be started before calling `code tunnel`.
143
143
Log into the target system and start the uenv, then start the remote server, for example:
144
144
```
145
145
# log into daint (this could be any other Alps cluster)
@@ -156,7 +156,7 @@ ssh daint
156
156
uenv run --view=default prgenv-gnu/24.11:v1 -- code tunnel --name=$CLUSTER_NAME-tunnel
157
157
```
158
158
159
-
Once the tunnel is configured, you can access it from VSCode.
159
+
Once the tunnel is configured, you can access it from VS Code.
160
160
161
161
!!! warning
162
162
If you plan to do any intensive work: repeated compilation of large projects or running python code in Jupyter, please see the guide to running on a compute node below.
@@ -165,7 +165,7 @@ Once the tunnel is configured, you can access it from VSCode.
165
165
[](){#ref-vscode-compute-nodes}
166
166
### Running on a compute node
167
167
168
-
If you plan to do computation using your VSCode, then you should first allocate resources on a compute node and set up your environment there.
168
+
If you plan to do computation using your VS Code, then you should first allocate resources on a compute node and set up your environment there.
169
169
170
170
!!! example "directly create the tunnel using srun"
171
171
You can directly execute the `code tunnel` command using srun:
@@ -176,7 +176,7 @@ If you plan to do computation using your VSCode, then you should first allocate
176
176
177
177
* `--uenv` and `--view` set up the uenv
178
178
* `-t120` requests a 2 hour (120 minute) reservation
179
-
* `-n1` requests a single rank - only one rank/process is required for VSCode
179
+
* `-n1` requests a single rank - only one rank/process is required for VS Code
180
180
* `--pty` allows forwarding of terminal I/O, required to sign in to Github
181
181
182
182
Once the job allocation is granted, you will be prompted to log into GitHub, the same as starting a session on the login node.
@@ -201,7 +201,7 @@ If you plan to do computation using your VSCode, then you should first allocate
201
201
```
202
202
203
203
* `-t120` requests a 2 hour (120 minute) reservation
204
-
* `-n1` requests a single rank - only one rank/process is required for VSCode
204
+
* `-n1` requests a single rank - only one rank/process is required for VS Code
205
205
* `--pty` allows forwarding of terminal I/O, for bash to work interactively
206
206
207
207
[](){#ref-vscode-containers}
@@ -234,7 +234,7 @@ $ cd path/for/code/executable/in/container
234
234
$ ./code tunnel --name=$CLUSTER_NAME-tunnel
235
235
```
236
236
237
-
## Connecting via VSCode UI
237
+
## Connecting via VS Code UI
238
238
239
239
!!! warning
240
240
This approach is not recommended, and is not supported by CSCS.
0 commit comments