The fastest way to switch projects in VS Code
VS Code treats each folder as a separate project. To switch between them, open the File menu, select "Open Folder", and choose a different directory. VS Code will reload with that folder's contents, settings, and extensions active. If you have unsaved changes in your current project, VS Code will prompt you to save them first.
You can also drag a folder onto the VS Code window to open it, or use the keyboard shortcut Ctrl+K Ctrl+O (Windows and Linux) or Cmd+K Cmd+O (Mac) to jump straight to the folder picker.
Key Takeaways
- Use File > Open Folder or Ctrl+K Ctrl+O to switch to a different project folder in VS Code.
- VS Code reloads completely when you change projects, so save your work first if you have unsaved changes.
- The Recent Folders list in the File menu lets you jump back to projects you have worked on recently without browsing.
- Workspaces let you open multiple projects at once in the same window, which is faster than switching back and forth.
- Each project keeps its own settings, extensions, and terminal history, so switching projects gives you a fresh environment.
Using the Recent Folders list to jump back quickly
VS Code keeps a list of the last 10 to 20 folders you opened. Click File, then hover over "Open Recent", and you will see a list of folder names. Click the one you want and VS Code switches to it immediately. This is faster than browsing your file system if you are moving between the same few projects.
If you want to remove a project from this list, right-click its name and select "Remove from Recent". This does not delete the folder from your computer — it just clears it from the menu.
Opening multiple projects in one window with Workspaces
Instead of switching between projects, you can open several at once using a Workspace. Click File, then "Add Folder to Workspace", and select as many project folders as you need. VS Code will show all of them in the Explorer panel on the left, stacked vertically. You can edit files from any project without switching windows.
To save a workspace so you can reopen it later with the same folders, click File, then "Save Workspace As". VS Code creates a .code-workspace file that stores the list of folders. Next time you open that file, all your projects load at once. This is useful if you always work on the same set of projects together — for example, a frontend folder and a backend folder.
Keeping project settings separate
Each project can have its own settings, which override your global VS Code settings. These live in a .vscode folder inside your project directory. When you switch projects, VS Code automatically loads that folder's settings — things like tab size, line length, which linter to use, and which extensions are active.
To set project-specific settings, click File, then Preferences, then "Settings". At the top of the settings panel, click the "Workspace" tab instead of "User". Any changes you make there apply only to the current project. This is why switching projects feels like switching environments — each one can be configured differently.
Using the command palette to switch faster
Press Ctrl+Shift+P (Windows and Linux) or Cmd+Shift+P (Mac) to open the command palette. Type "open folder" and the first result will be "File: Open Folder". Press Enter and the folder picker appears. This is one keystroke faster than using the File menu if you use it often.
You can also type "recent" in the command palette to see "File: Open Recent". This gives you the same recent folders list, but without leaving the keyboard.
Switching projects without losing your place
When you switch back to a project you have worked on before, VS Code remembers which files you had open and where your cursor was in each one. The files do not reopen automatically — you have to click them in the Explorer — but the state is saved. This means you can jump between projects and pick up where you left off without hunting for the right file.
If you want to preserve your exact state across sessions, save a Workspace instead of just opening a folder. Workspaces remember not just which files are open, but also which ones are in focus and which tabs are visible.
Frequently Asked Questions
Can I open two VS Code windows with different projects at the same time?
Yes. Click File, then "New Window" to open a second VS Code window. You can then open a different project in each one. This is useful if you need to compare code side by side or work on two projects simultaneously without using a Workspace.
What happens to my terminal when I switch projects?
VS Code keeps a separate terminal history for each project, but the terminal itself closes when you switch. If you have a process running in the terminal, it will stop. Open a new terminal in the new project if you need one. Using a Workspace avoids this because you stay in the same window.
How do I know which project I am currently in?
The project folder name appears in the title bar at the top of the window, and also at the top of the Explorer panel on the left. If you have multiple folders open in a Workspace, all of them are listed in the Explorer.
Can I set different extensions for different projects?
Yes. Extensions can be enabled or disabled per workspace. Right-click an extension in the Extensions panel and select "Disable (Workspace)" to turn it off only for the current project. This keeps your environment clean — each project loads only the tools it needs.
What is the difference between opening a folder and opening a workspace?
Opening a folder shows one project at a time. Opening a Workspace shows multiple folders in the same window. Workspaces also save your exact configuration — which files are open, which extensions are active — so you can return to the same setup later.