Visual Studio Code – Portable Mode (Windows)
What is Portable Mode?
Portable Mode lets you run VS Code along with all its settings and extensions from a single folder—ideal for using from a USB drive or different machines without installing.
How to Enable It on Windows
- Download the ZIP version of VS Code for Windows (not the installer).
- Extract the ZIP into a folder.
- Create a
datasubfolder inside that folder:
- Starting from then on, VS Code will store all user-related data—settings, session state, extensions, etc.—inside that
datafolder instead of the usual AppData directories.
Important Notes
- Do not attempt this with an installer-based installation (MSI/EXE). It only works with the ZIP archive.
- The Windows ZIP archive does not support auto-updates—you’ll need to update manually.
Updating Portable VS Code
To update, simply extract the newer ZIP version and copy over or move your existing data folder into the new folder.
Migrating an Existing Installation to Portable Mode
You can convert an existing user installation to Portable Mode:
- Download and extract the ZIP as described.
-
Inside the
datafolder, create subfolders and copy over:user-data: copy your user data (e.g., from%APPDATA%\Code)extensions: copy extensions (e.g., from%USERPROFILE%\.vscode\extensions)
Resulting structure:
Optional: TMP Directory
VS Code in Portable Mode still uses the system’s TMP directory by default. If you’d prefer it to be self-contained, create an empty tmp folder inside the data directory. VS Code will then use that for temporary files.
Summary Table
| Step | Action |
|---|---|
| Download | Get the ZIP version for Windows (not installer) |
| Extract | Unzip to a folder |
Create data folder |
Inside the VS Code folder |
| Run | Launch Code.exe from inside the folder |
| Portability | Entire setup (settings, extensions, session) moves with the folder |
| Updates | Manual—copy data into new version’s folder |
| Optional TMP setup | Place empty tmp folder inside data to localize temp files |
Source: (Visual Studio Code)