Portable applications are programs that is able to run without having to install and register with the system. They don’t change your PC settings or clutter it with unwanted files and invalid Registry entries. To me personally, I love portable apps because they can be used on any PC, even with restricted user permissions.
VSCode is my favorite code editor, and if you didn’t know, it officially supports Portable mode. All data created and used by VSCode to be placed under its folders, make it easy to move things around across different environments.
In this article, we are going to show you how to get the official version of Portable VSCode as well as migrate your existing setup to the portable one.
Download Official VSCode Portable
Microsoft provides VSCode Portable in archived formats. In order to download the Official VSCode Portable, follow the steps below.
Head over to Download Visual Studio Code page.
If you are using Windows, look for
.zipbuilds that is compatible with your architecture (64-bit, 32-bit, ARM). Please do note that VSCode Portable for Windows cannot be updated automatically.
Linux users can choose between
.tar.gzarchived builds (64-bit, 32-bit, ARM).
MacOS users should determine their CPU architecture first to be able to choose the right version between Universal, Intel Chip and Apple Silicon builds.
VSCode Portable on Windows/Linux
Once you’ve downloaded the archive, unzip/un-tar the archive. Inside the VSCode Portable you’ve just unzipped, create a
data folder, which will contain all VS Code data, including session state, settings, extensions data, etc. This folder can be moved between VSCode versions, retaining your setups and preferences.
You may need to create another folder inside VSCode Portable folder named
tmp to contain temporary files, if you don’t have permission to the system
VSCode Portable on macOS
On macOS, you need to place the data folder as a sibling of the application itself and name it
|- Visual Studio Code.app |- code-portable-data
Portable Mode won’t work if your application is in quarantine, which happens by default. Run the following command to remove quarantine attribute if Portable Mode doesn’t work.
Code language: CSS (css)
xattr -dr com.apple.quarantine Visual\ Studio\ Code.app
Migrate data to Portable VSCode
If you’ve installed VSCode into the system and now want to move to VSCode Portable, follow the steps below. Basically you only need to copy the
data folder of the installed VSCode to the portable one.
- Create the
datafolder inside VSCode Portable folder (or
code-portable-datafolder outside) depending on your operating system.
- Copy the user data directory
dataand rename it to
- Copy the extensions directory to
VSCode has numerous features that supports developers. Here’s a few of them that we’ve covered, if you’re interested :
- How to quickly create a comment block in VSCode
- How to quickly duplicate a line in Visual Studio Code
- How to comment out multiple lines in Visual Studio Code
- How to automatically indent your code in Visual Studio Code
- VSCode Format On Save – everything you need to know
- VSCode Command Palette
- Bind terminal commands to VSCode keyboard shortcuts
- Show hidden files in VSCode
- Install extensions in VSCode