LogoLogo
  • Start Here
    • Introduction to NCIL
      • Welcome
      • Mission Statement
      • Getting Started
      • Make this handbook better!
  • Policies & Expectations
    • Working in NCIL
      • Aaron's Philosophy on Supervision
      • General Policies
      • Roles & Expectations
        • Interpersonal and Working Relationships
        • Lab Director: Aaron Newman
        • Lab Manager: Cindy Hamon-Hill
        • Collaborators
        • Postdocs
        • Lab Research Assistants
        • Graduate Students
        • Undergraduate Students
      • Work Ethic
        • Vacations & Absences
      • Money
        • Employment
        • Undergraduate Research Awards
        • Graduate Student Funding
    • Communication
      • Basecamp
      • Lab Meetings
      • Communication Among Lab Members
      • Communicating with Research Participants
      • Website & Social Media
      • Meetings with Supervisor
      • Response Times
    • Lab Space and Resources
      • Hours of Operation
        • After-Hours Research
      • Safety
    • Intellectual Property
      • Data
      • Authorship
      • Publishing: Where and When
  • Data Management & Analysis
    • Data Science Tools
      • Jupyter
        • JupyterLab
      • Python
      • R
      • How to set up your computer for NCIL data science
    • Servers & Computers
      • Accounts
      • File Server (NCILNAS)
        • Accessing NCILNAS
      • Compute Server
        • Jupyter
        • VS Code - Setup
        • VS Code - Everyday Use
      • GitHub Copilot
    • Data Analysis
      • Behavioural Data
      • EEG Analysis
      • fMRI Analysis
        • Processing fMRI Data with SPM
        • fMRI Analysis in SPM
      • Power analysis with simR in R
    • Data Management
      • Github
      • Open Science
    • Learn Some Coding
  • How To Run Experiments
    • How to Get a Research Study Started
      • Research Ethics
      • Your Research Protocol
        • Components of a Research Protocol
      • Pilot Testing
    • Running a Participant
      • Communicating With Participants
      • Recruiting
      • Before Each Participant Arrives
      • When a Participant is in the Lab
    • Experiment Programming
      • Stimulus Presentation Programs
      • Brain-Computer Interface Programs (BCI)
      • EEG Trigger Codes
        • Lab Streaming Layer
        • Trigger Code Hardware Setup
        • Timing Test
    • Data Storage & Protection
    • Word Similarity Measures
  • Communicating Science
    • Submitting papers to Aaron for review
    • Lab Meeting Talks
    • Independent Study Course
    • Honours Thesis
      • Getting Started
    • Master's Thesis
    • 😓PhD Dissertation
    • PhD Comps
    • Conferences
    • Publications
    • Reviewing Journal Manuscripts
  • Old
    • VS Code on NCIL server
Powered by GitBook
On this page
  • First Time Setup
  • Change VS Code's Connection Timeout Setting
  • Configure Extensions to Auto-Install in VS Code Remote
  • Connect to VS Code Remote

Was this helpful?

  1. Data Management & Analysis
  2. Servers & Computers
  3. Compute Server

VS Code - Setup

PreviousJupyterNextVS Code - Everyday Use

Last updated 2 months ago

Was this helpful?

To use VS Code on the server, you need to create an SSH key. If you have ever done this before on your current computer, you don't need to do it again, and you can skip to the section.

First Time Setup

Change VS Code's Connection Timeout Setting

The first time you connect to the server, it will install all of the Python and R packages you need. This process takes several minutes, however, and VS Code defaults to waiting only 15 s after login for any processes to end. Long story short, if you don't change this setting, VS Code will disconnect you before all the packages get installed.

Open Settingsfrom the VS Code menu and in the search bar type remote timeout. Change the value of Remote.SSH: Connect Timeout to 300.

Configure Extensions to Auto-Install in VS Code Remote

You'll always need extensions when working in VS Code — at the very least, the Python and Jupyter extensions, GitHub Copilot, R, and probably some others. Below is a suggested list.

Even if you installed these extensions in VS Code on your laptop, they won't automatically be installed in your server installation of VS Code. Do the following to define the extensions that you always want to be installed in a remote VS Code session (doing this will also ensure that all your extensions are re-installed if the server OS is reinstalled, which happens frequently).

In VS Code, go to Settingsand in the search bar type extensions. In the left sidebar of results, click Extensionsthen select Remote-SSH. You'll see an Add Itembutton. Click that and then paste each of the extension names below in, clicking OKthen Add Itemfor each one (you can't paste in a list, unfortunately):

ms-python.python  
ms-toolsai.jupyter     
reditorsupport.r 
ms-python.vscode-pylance
GitHub.copilot
GitHub.copilot-chat 
ms-toolsai.datawrangler
yzhang.markdown-all-in-one
ms-azuretools.vscode-docker
ms-vscode-remote.remote-containers
tomoki1207.pdf
george-alisson.html-preview-vscode
mechatroner.rainbow-csv

Connect to VS Code Remote

First Time

Open VS Code on your computer, and type Cmd-Shift-p(Ctrl-Shift-pon Windows).

In the box that pops up, start typing Remote-SSH: Connect Current Window to Host...

Select this option when it pops up, then click + Add New SSH Host

In the box that pops up, enter: ssh github-username@ncil.psychology.dal.ca —Except replace github-username with your actual GitHub username. Save the configuration by clicking the first option in the list you see (it will end in .ssh/config).

The first time you connect, as noted above, there will be a delay of a few minutes while your Python and R packages are installed.

After the First Time

In future sessions, you will still need to Cmd-Shift-p(Ctrl-Shift-p on Windows) Remote-SSH: Connect Current Window to Host... but you can just select your saved configuration rather than typing the whole ssh command every time.

Alternatively, you should install the Remove Development VS Code extension. Then you'll have an icon in your Activity Bar (left side of window) that looks like a screen with a little circle in the bottom right corner. Each different folder on the server that you've connected to via SSH in the past will show up here, and you can just click the -> arrow next to its name to connect again.

Connect to VS Code Remote