re: VS Code Profile Switcher Extensions Support VIEW POST


It is a good idea. How did I never thought of it?

Jokes aside, I'm curious. Why do you remove the extensions instead of disabling them?
Doesn't disabling them accomplish the goal of getting down the memory footprint and/or load times?


Interesting aside - when you disable an extension in VS Code it isn't returns in the list of extensions that the extensions API has access to.


I see. Microsoft is known for making extensions development complicated sometimes.

Anyway, it is a good extension. Keep the good work. 👍

It's a fine balance between performance, extensibility and reliability.

I do agree that you don't want to have extensions that can easily interfere with the operation of other extensions, if it was easy to disable extensions then you could end up with a malicious extension author messing with what's loaded.

Similarly, the more of the internals available to an extension the more you risk startup penalties because you have to make a larger sandbox.

Browsers suffer a similar problem, the more they allow you to do in an extension the more it risks the performance of the browser, and it's more often than not the browser that the finger gets pointed at than the extension.

I agree with you on those points. I haven't really looked into VSCode extensibility, but I had a sour experience with Visual Studio when developing an extension for changing text editor colors.

But nonetheless, I think the ability to disable extensions has a lesser impact than removing extensions if security is the concern. Said in another way, I believe being able to remove them is worst than being able to disable them.


It would, but unfortunately there's no API that's exposed to extensions that allows you to disable an extension.

I did some digging around the VS Code source and it looks like disabling extensions requires writing to one of the databases that VS Code uses internally, not just setting some config flags or anything.

Because of that I decided I wouldn't try and disable (don't want to risk corrupting the database) the extensions, just remove them.

code of conduct - report abuse