Developing with VS Code - ATTPC/ATTPCROOTv2 GitHub Wiki

This is WIP document. I figured since I need to get everything setup on a new computer/cluster it was worth trying to finally make the switch to VS Code from a homebrew emacs setup. I think VS Code has reached the point that it is at feature parity and it seems to be what most people are defaulting to these days.

The general idea for this document is the following: VS-Code running on a local machine with the software/data located on a remote machine (either WSL2 on the same physical machine or a remote cluster).

This document was written with the assistance of GitHub Copilot chat. It was quite helpful in figuring out where to locate everything in the VS Code interface and how to configure VS Code project files.

Install VS Code

Download and install VS Code.

This is a fairly straightforward step. VS code is a text editor that integrates git and extensions that make it essentially a full blown IDE. For our purposes, the most useful part is VS Code can run on your local computer while editing and building source code on a remote computer through an SSH tunnel (see Remote Development).

Install required/recommended extensions

Here are the list of extensions required to use VS Code for developing ATTPCROOT. Go to the Extensions tab (or press shift+ctrl+X) and search for the following extensions.

  • C/C++ Extension Pack (required)
  • GitHub Copilot (recommended, free for students and educators)
  • Remote - SSH (required)
  • WSL (if your source code is local in a WSL2 instance)

Configure VS Code

There are a few steps. I am assuming you have cloned and setup your fork of the repository on the remote computer already. For this document, I will assume your repository lives in the folder ~/ATTPCROOTv2.

  1. Setup SSH Config files for access to remote server.