Skip to content

Show Number of Disabled Extensions in VS Code #86

Discussion options

You must be logged in to vote

Hi @anasir975 ,

If you loop through the enumerator, you can see a few attributes for each Extension, but unfortunately, there is no enable state.

There is however an isActive state, but it only says if the extension was activated, which depends on activationEvents entry.

        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)" : "";

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by isidorn
Comment options

You must be logged in to vote
4 replies
@gjsjohnmurray
Comment options

@alefragnani
Comment options

@anasir975
Comment options

@alefragnani
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants