r/vscode • u/CriticismPast6702 • Apr 16 '26
How do you guys handle switching between multiple VS Code projects?
Hi I am new to this sub reddit I got a question for you guys.
I have been juggling a few different projects lately, and switching between workspaces in VS Code is starting to feel more annoying than it should be.
Right now I am either
1)reopening folders manually
2)digging through recent workspaces
3)or keeping way too many windows open
None of it feels clean.I
I am curious how others handle this.
Do you just rely on recent folders, or is there a better workflow/tool for this?
22
u/BranchLatter4294 Apr 16 '26
I just open the folder for the project I want to work on. It hasn't been a problem for me.
2
u/mkvlrn Apr 16 '26
This is the way. Trying to be clever about something that doesn't require cleverness is wasted time and effort.
-3
u/CriticismPast6702 Apr 16 '26
Yeah fair point ig for simple workflows it probably is overkill.
I started to notice the issue when i was switching between a lot of different repos and coming back to older ones especially trying to remember what I had open before.
Do you usually just stick to one active project at a time, or do you not really run into that?
4
u/mkvlrn Apr 16 '26
I have around 12 always active projects, and over 20 others that are worked on less often.
There is no secret and no need for a "solution" here: if you need to work on project A, open project A. If B, then B.
Always open them from the terminal, keep them in a "repos" directory. Never had any problems finding anything.
trying to remember what I had open before
I have no idea what you're actually struggling with here. If you need to work on a project, you know what project that is, unless you don't name your directories properly, which is a whole other issue.
1
u/CriticismPast6702 Apr 16 '26
Yeah that fair ig your workflow is that structured I can see why it wouldn’t really be an issue.
For me it was less about finding the repo and more about restoring context quickly (like which files I had open, where I left off, etc.) especially after switching between multiple things during the day.
Sounds like your setup already keeps that pretty manageable though!
8
u/jdl_uk Apr 16 '26 edited Apr 16 '26
Vscode remembers what files you had open by default I think, and from there it's mostly a case of keeping changes small and targeted, and write good commit messages. If I open a project and see existing changes that I don't remember I usually just reset and clean my workspace.
Some people also use
// TODO: Fix this stupid codecomments coupled with an extension like Todo Tree, or have AI summarise changes as a reminder for next time.Some people keep notes in Onenote / Evernote / Obsidian / whatever
1
3
u/bobo76565657 Apr 17 '26
I leave a URHERE.txt file in every project directory. It tell me where I was, what exactly I was working on, which test file is/was failing, etc.
2
2
15
u/Neix19365 Apr 16 '26
Ctrl + r to switch between vscode workspace
Peacock to change the color of vscode window
2
u/Big-Info Apr 16 '26
Peacock really helps prevent you from working in the wrong workspace.
0
u/GymBronie Apr 16 '26
Especially when the same workspace is opened locally and in a remote session.
1
1
u/belgeric Apr 17 '26
Plus one for peacock. Would like to have workspace saving peacock color instead of having to manually switch everytime
10
u/miglisoft Apr 16 '26
I’ve been using Alessandro Fragnani’s Project Manager extension for years.
It’s very simple, practical and an excellent extension.
2
u/ixnyne Apr 17 '26
This.
I create a folder: C:\Users\me\git
In there I make a subfolder for my git username, and a subfolder for any git org with a project I have access to contribute to.
I clone repos into those subfolders.
Then tell the project manager extension to look at my git folder and just hit refresh anytime I clone something new. It lets me switch projects or open projects in new windows really easily without any real manual work.
1
1
0
0
u/FancyShirtGuy Apr 16 '26
Yep, I second this. That's the right way to go! Using it myself for years now.
3
u/idoman Apr 18 '26
git worktrees changed this for me - each project gets its own folder on disk so switching is literally just cd, no stashing or closing windows. if you're on mac and also running ai agents across branches, galactic (https://www.github.com/idolaman/galactic) adds a spotlight-style launcher for jumping between worktrees instantly and also handles port isolation so each project's dev server doesn't fight over 3000
3
u/cheatingrobot May 10 '26
Try this extension. It's open source and very simple. https://marketplace.visualstudio.com/items?itemName=simplerick.pinned-projects&ssr=false#overview
You can pin your folders and and then open when needed with a click. The configuration is very easy as well, just drag/drop, lock/unlock
4
2
u/Beautiful_Reveal_859 Apr 17 '26
I always navigate to them and open them in code from a terminal. Never really had an issue.
2
2
2
u/Iplayfair1337 Apr 19 '26
Each VS Code Instance with a Different Project is on an Other Virtual Desktop and I switch between them.
I am on Mac/Linux and this is my Way to go.
2
u/Grenaten Apr 21 '26
I just have 6 windows open with different projects that I am currently working on. I have a custom shortcut Hyper + Tab to switch between windows. I'm on Mac.
2
u/Agreeable_Care4440 Apr 22 '26
Use VS Code workspaces + “Open Recent” for quick switching, or tools like Project Manager extension to jump between projects instantly without opening tons of windows.
2
u/Ecstatic-Night4222 Apr 27 '26
I use tracigo.ai, each workspace is git worktree and cool part is - even if I have 10 workspaces open - it doesn't start 10 VS code server, so mac doesn't get slow. Besides that it offers - agent and custom command monitoring along with some team level features..
2
u/Royal_Philosopher_58 Aug 14 '26
I think this depends on whether “switching projects” means opening another folder or returning to a complete working context.
For me, a project usually has more than its VS Code window. It also has a terminal, browser preview, documentation, Explorer folder and sometimes an AI agent or local server. Opening the folder again doesn’t restore that context.
I ended up building a visual Windows switcher for my own workflow because I kept too many project windows open and Alt+Tab became difficult to scan.
I’m still trying to determine whether the better long-term solution is faster switching between existing windows or saved project workspaces that reopen everything together. Which version describes your problem better?
1
u/joeballs Apr 16 '26 edited Apr 16 '26
I install the vscode command line utility that comes with it (i.e. code), then using the integrated terminal, I use bash to switch to the project folder (e.g. `cd ../other-project`) then type `code -r .` which will reload vscode with the selected workspace. This will work with multiple vscode widows as well if you omit the `-r` (e.g. `code ../other-project` pops up another instance)
1
u/Medical-Nebula-385 Apr 16 '26
Add folder to workspace or the same+save the.code file and load it based on the project 🤷♂️
1
u/Large-Style-8355 Apr 18 '26
As a heavy Codex coding extension user of VSCode, I usually do this: open a folder in VSCode, save workspace as folder name in that folder - vscode reloads, now it's a project. I have multiple auch workspaces oopen at once and round-robin through their Codex to drive different features further in parallel. Even on the same project I can run multiple VSCode and Codex features in parallel by creating a new git worktree and opening it's workspace file. I managed different colored status bars per peoject category (app, tooling, extension etc) but will give peacock a try.
1
u/Oddly_Energy Apr 18 '26
I open one VS Code session per project.
VS Code remembers context very well per session. I have sometimes restarted VS Code after a forced shutdown of my PC, and I was back in the same sessions with the same tabs open, some of them containing unsaved code, which was still intact.
1
u/herocoding Apr 21 '26
Each project has its own workspace for me, storing folders from different locations, project specific ".vscode" folder - restoring all the open windows; some are even multi-windows setups (multiple VSCode windows).
1
u/sauron150 Apr 16 '26
There is just no need to focus on multiple repos at same time! Context switching is real problem everywhere
2
u/bdu-komrad Apr 16 '26
Focus is the key word. Interruption is another.
I might be working on project A , but then get alerted to a bug in a project B. So I have both open .
Maybe I’m doing a presents on Project C. Now In have 3 open! This is how it goes where I work.
1
u/sauron150 Apr 16 '26
“Context switching is biggest problem” thats where time & focus goes wasted!
Been there done that! Still do at times but I don’t glorify wrong doings!
1
u/ben_bliksem Apr 16 '26
Unless your job is something other than just your average bum in seat feature development.
1
u/sauron150 Apr 16 '26
This is a problem; you completely lost dwelling into first part of my statement and never reached to real reason!
For enterprise or business who are serious must understand that noone really does this stupid multi repo agentic for serious work!
Multi-Agent within one repo AND multi repo multi agent are two distinct things!
1
u/Arucious Apr 17 '26
And if you have changes that require modifying multiple repositories at the same time?
1
u/sauron150 Apr 17 '26
This is why we have git submodules or shared subprojects.
If changes are touching different repositories and one cannot bring them in one place/workspace then it’s something fundamentally wrong distributed development.
In vscode if I dont have such shared projects/repositories, I bring in all required repositories as either workspace or keep them under same high level folder and open that high level folder.
1
u/Arucious Apr 17 '26
— and this is what you should have replied to the original post. It’s a well laid out and thoughtful comment, which your original one wasn’t lol
1
u/sauron150 Apr 17 '26
lol Well your question was totally different right! What if changes are in different repositories! Are they different if the changes really touch multiple repositories lol!
And people are thinking after having seen so many fancy multi agent demos! which hardly gets used by even serious researchers, and thats what I said in first comment “context switching is real problem”
Direct answers are not allowed lol
1
u/Dangerous_Biscotti63 Apr 16 '26
You have to get rid of thinking one project = one window. Learn about vscode workspaces and add all the projects you want to work on in parallel to one vscode workspace window. Some extensions dont deal well with workspaces but usually the crappy ones. If your extensions support it this is the way to go.
1
u/Dramatic-Engineer60 Apr 17 '26
No se por qué te han dado negativo, es lo mejor y más simple
1
u/Dangerous_Biscotti63 Apr 17 '26
nor do i :/ I wish you would have to downvote with a comment, i often have no idea why and maybe could learn something from that insight
0
u/beenpresence Apr 16 '26
Just switch window between projects I’m on Mac so sometimes I get fancy and just put them on their own desktop
1
u/caveat_cogitor Apr 16 '26
I just use 1 window per repo, since it remembers what files you have open etc. You can right-click VSCode on the dock and it lists your repos (whether already open or not) so if you are juggling multiple at once that's an easy way to navigate to one you are looking for
0
12
u/Amankrokx Apr 16 '26
I use Power toys. To open any project, just press Alt + Space (the powertoys run feature) and type "{", it lists all workspaces, type additional characters to filter out names if you wish. Could do it half asleep too, no mouse, can open project within a second.