VSCode Portable: How to get the Official Version

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.

  1. Head over to Download Visual Studio Code page.

  2. If you are using Windows, look for .zip builds that is compatible with your architecture (64-bit, 32-bit, ARM). Please do note that VSCode Portable for Windows cannot be updated automatically.

    image-20210527073821087

  3. Linux users can choose between .tar.gz archived builds (64-bit, 32-bit, ARM).

    image-20210527073853656

  4. MacOS users should determine their CPU architecture first to be able to choose the right version between Universal, Intel Chip and Apple Silicon builds.

    image-20210527074139095

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.

image-20210527083542207

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 TEMP folder.

VSCode Portable on macOS

On macOS, you need to place the data folder as a sibling of the application itself and name it code-portable-data.

|- 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.

xattr -dr com.apple.quarantine Visual\ Studio\ Code.app
Code language: CSS (css)

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.

  1. Create the data folder inside VSCode Portable folder (or code-portable-data folder outside) depending on your operating system.
  2. Copy the user data directory Code to data and rename it to user-data
    • Windows %APPDATA%\Code to vscode_portable\data\user-data
    • macOS $HOME/Library/Application Support/Code to code-portable-data/user-data
    • Linux $HOME/.config/Code to vscode/data/user-data
  3. Copy the extensions directory to data
    • Windows %USERPROFILE%\.vscode\extensions to vscode_portable\data\extensions
    • macOS ~/.vscode/extensions to code-portable-data/extensions
    • Linux ~/.vscode/extensions to vscode/data/extensions

VSCode has numerous features that supports developers. Here's a few of them that we've covered, if you're interested :

Click to rate this post!
[Total: 18 Average: 5]

Leave a Comment