Show Number of Disabled Extensions in VS Code #86
-
vscode.extension.all displays the number of extensions installed in the machine programmatically. Is there any way to find out the number or list of extensions that have been disabled programmatically? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @anasir975 , If you loop through the enumerator, you can see a few attributes for each There is however an for (const ext of vscode.extensions.all) {
const anExtension = await vscode.extensions.getExtension(ext.id);
if (!anExtension) { continue }
const isActive = anExtension.isActive ? "$(check-all)" : "$(info)";
const name = anExtension.packageJSON.displayName ?? anExt?.packageJSON.name;
const publisher = anExtension.packageJSON.isBuiltin ? "(builtin)" : "";
...
} If you really need the Hope this helps |
Beta Was this translation helpful? Give feedback.
-
I posted there as well but then they redirected me here |
Beta Was this translation helpful? Give feedback.
Hi @anasir975 ,
If you loop through the enumerator, you can see a few attributes for each
Extension
, but unfortunately, there is noenable
state.There is however an
isActive
state, but it only says if the extension was activated, which depends onactivationEvents
entry.