Visual Studio Code
MousePaw Media officially recommends the Visual Studio Code IDE for all development work. All of our projects are preconfigured to support this IDE.
Installing
If you’re on Ubuntu Linux, you can install from the official apt repository.
sudo apt install curl
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code
Alternatively, on most Linux systems, you can install from Snapcraft:
sudo snap install code
Or, you can install from Flatpak on most Linux systems:
flatpak install flathub com.visualstudio.code
For Windows and Mac, you can download and install VSCode from code.visualstudio.com. If you’re installing on another type of Linux system, you can find instructions on the official article Running VS Code on Linux.
Using with Windows and WSL
If you’re using the Windows Subsystem for Linux (recommended for Windows users), you will need to install the WSL extension. This will allow you to run VSCode within WSL, and thus access your Ubuntu-based development environment.
To do this, open the Extensions pane and search for the official “WSL” extension by Microsoft. Install it.
On the far left of the bottom status bar of Visual Studio Code, you will now see a new button with two arrows pointing to each other. When you hover over it, you’ll see Open a Remote Window. Click that button, and then from the menu that appears towards the top of the window, click Connect to WSL. This will launch a new window.
You can know whether your current window is running in WSL by looking at this leftmost button on the status bar. If it’s running in Ubuntu in WSL, for example, it will say WSL: Ubuntu.
Extensions
We recommend the following extensions (author name in parenthesis). Make sure you read the description of each, so you understand what it does and how it should be configured.
Note
If you’re using VSCode with WSL, ensure you install the extensions from within a VSCode window running in WSL.
C/C++ (Microsoft)
C/C++ Advanced Lint (Joseph Benden)
C/C++ Themes (Microsoft)
C/C++ Extension Pack (Microsoft)
C/C++ Snippets (Harsh)
CMake (twxs)
CMake Tools (Microsoft)
CodeLLDB (Vadim Chugunov)
Deno (denoland)
Docker (Microsoft)
Esbonio (Swyddfa)
gitignore (CodeZombie)
GitLab Workflow (GitLab)
GitLens (GitKraken)
Live Share (Microsoft)
Makefile Tools (Microsoft)
markdownlint (David Anson)
Python (Microsoft)
Python Test Explorer for Visual Studio Code (Little Fox Team)
Test Explorer UI (Holger Benl)
Table Formatter (Shuzo Iwaski)
XML Tools (Josh Johnson)
Important
C/C++ Clang Command Adapter
makes the linter act weird.
Do not install it.
Note
cppcheck
has extremely high CPU usage, so we use
C/C++ Advanced Linter
instead.
You may also consider the following helpful extensions. You should read the description of each before installing:
Apache Conf (mrminc)
Auto Close Tag (Jus Han)
Better C++ Syntax (Jeff Hykin)
Bookmarks (Alessandro Fragnani)
Clock in status bar (Compulim)
Code Spell Checker (Street Side Software)
Comment Anchors (Exodius Studios)
Contextual Duplicate (Lars Fernhomberg)
Dev Containers (Microsoft)
Hex Editor (Microsoft)
indent-rainbow (oderwat)
Insert Unicode (brunnerh)
Markdown All in One (Yu Zhang)
Overtype (DrMerfy)
Path Intellisense (Christian Kohler)
Paste URL (kukushi)
Peacock (John Papa)
Reflow Paragraph (Troels Damgaard)
shell-format (foxundermoon)
Sort lines (Daniel Imms)
TODO Highlight v2 (Jonathan Clark)
Toggle Quotes (BriteSnow)
Unicode code point of current character (zeithaste)
VSCode Great Icons (Emmanuel Béziat)
XML (Red Hat)
Connect to GitLab
In a browser, log into the MousePaw Media GitLab. Click your profile picture at the top of the left pane and select Preferences. On the left, select Access Tokens. Click Add new token.
Give your token a name, and select the scopes api and read_user. Then click Create personal access token.
A green box will appear at the top of the page with the heading Your new personal access token. Click the clipboard icon to the left of the text field to copy the access token.
If you’ve installed the GitLab Workflow extension mentioned above, you will
see a GitLab icon on your VSCode side pane. Select the option to add an
access token. When prompted, enter the url https://gitlab.mousepawmedia.com
.
Then, when prompted for the access token, paste the token you copied
from GitLab.
Settings
You should go through the settings on
, and set them to your preferences.