How to Setup Visual Studio Code for the ifarm
From GlueXWiki
Table of contents
Contents
[hide]Welcome! Have you ever wanted to edit code with smart code completion, integrated Git, syntax highlighting, intuitive debuggers, and so much more, all wrapped into one? Well look no further than Visual Studio (VS) Code! By the end of this guide you will be able to connect to the ifarm and have all these powerful tools right at your fingertips. If you run into any problems (especially if you have Windows machine, as this guide has only been tested for Apple devices) then please message me (Kevin Scheuer) over Slack and let me know!
Setup
Before beginning, please ensure you have the following:
- MobilePass installed and setup, and a working JLab Computing account
- See the guide under Software on the Getting Started at GlueX page
- Or see the Prerequisites section in this servicenow article
- Downloaded VS Code
The .ssh/config file
- Your first step for getting onto the ifarm will be creating a ssh config file, which dictates how your device, or “local machine”, will connect to the remote JLab server
- Open VS Code and navigate to the Extensions tab on the left hand sidebar. Copy and paste
ms-vscode-remote.remote-ssh
into the search bar, and install the package.- If you can’t see the sidebar, try in the menu View > Appearance > Primary Side Bar
- In the menu bar go to View > Command Palette. Search and select
Remote-SSH: Open SSH Configuration File
- Your default file is likely at
/Users/YOUR_USERNAME/.ssh/config
. Select this file.- If not yet created, no worries. Instead of copy/pasting the file contents in the next step, simply place the file at this location
- If settings already exist in this file they can be kept, so long as they are not ifarm related. We will be using a slightly modified version from the JLab recommended config file. Download the custom config file and copy/paste its contents into your .ssh/config file