Repository navigation
Preserve Extension Host When Switching Workspace Folders #3103
soumalyasarkar
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I would like to request an option to switch the currently opened project folder without restarting the Extension Host.
Currently, when I use File → Open Folder to open another project, VSCodium reloads the window and restarts the Extension Host. This causes all active extensions to deactivate and reactivate.
This is particularly inconvenient when using extensions that maintain persistent sessions, embedded browsers, webviews, or other background processes.
Proposed Behaviour
When switching from one folder to another:
Replace the currently opened folder with the newly selected folder.
Update the Explorer and workspace context.
Reload the workbench UI if necessary.
Preserve the existing Extension Host process.
Keep compatible extensions and their running sessions alive.
Why This Matters
I frequently switch between multiple development projects.
I use VSCodium's integrated browser and other extensions that maintain active sessions. Restarting the Extension Host every time I switch projects interrupts my workflow and wastes resources.
I also use a low-resource laptop, so avoiding unnecessary extension initialization and process restarts would be beneficial.
Suggested Solution
Introduce an optional setting or workspace-switching mechanism that separates the workbench reload lifecycle from the Extension Host lifecycle.
For example:
window.preserveExtensionHostOnFolderSwitch
The setting would allow users to switch project folders while keeping the Extension Host alive whenever technically safe.
I understand that some extensions may need to reactivate when workspace context changes. However, preserving compatible extensions and their existing sessions would be extremely useful.
Thank you for considering this feature!
All reactions