-
Notifications
You must be signed in to change notification settings - Fork 19
[Question] Loading extensions by profile #2
Comments
It's a really good question, I'm going to investigate it (as I'd like that feature too, but settings was top priority). One thing that may be a challenge with extensions is that some could require a reload of VSCode if you enable/disable it. Would it be acceptable to have that happen? Also, I'd look to just programmatically disable the extensions rather than install/uninstall, as that should speed things up. Again, would that be an acceptable user experience? |
I've spent a bit of time digging into this today, it looks like it's a bit trickier than I was hoping for. It looks like it might not be possible to programmatically enable/disable extensions, and there's also not an API that I can lean on. I'd have to employ an approach similar the way Settings Sync works. I'll have a look at that tomorrow. |
Would it be possible to swap out the extensions directory and/or the user data directory at runtime? I've set up different VS Code shortcuts in the past to launch Code with different sets of extensions for different workloads using '--extensions-dir' & '--user-data-dir' on the command line and it works great. (gotta believe that would require a reload though) |
@mburleigh I'll do some investigation into the source, but I highly doubt that at run time I can interact with Code at such a low level. I know there's a bunch of APIs that would be useful for me to access but they don't get exposed to the extension host (as far as I can tell at least). |
I've made some progress on this today, and it's in this commit: dc1d39b It's not complete, so I won't release it (if you want to test it you can grab it off the build job). The way it works is:
Edit: Ok, looks like the artifact isn't publicly accessible, so if you want to test it for me you can clone the repo and run the extension. |
Should mostly switch fine Backs up extensions to globalStorage when you remove them for faster reload Install not working yet
🎉 Release 0.3.0 is out with extension load/unload support: https://marketplace.visualstudio.com/items?itemName=aaronpowell.vscode-profile-switcher&wt.mc_id=profileswitcher-github-aapowell |
Can we adjust which extension to be loaded per profile along with other settings?
The text was updated successfully, but these errors were encountered: