skip to Main Content

An expected output of a certain extension stopped occurring, so I want to figure out if there is some interference. I used the Reload With Extensions Disabled command to try running the extension in isolation, but apparently I am unable to enable any extensions whatsoever in this mode, which kind of makes sense, but is unintuitive.

How can I achieve the desired effect of running with all but a select few of my extensions disabled?

enter image description here

2

Answers


    • Note: To use Profiles you must currently have the setting Workbench > Experimental > Settings Profiles: Enabled checked (I believe in vscode v1.75 they will be enabled by default, or st least the experimental designation will be removed).

    Create a temporary profile: Gear icon/Profiles/Create…/Create a Temporary Profile.

    That will reload with all extensions disabled, but you can then quickly install the one particular extension you want to test into that temporary profile.

    Then when you are done you can go back to your Default profile the same way (with all your previous extensions enabled) and the temporary profile will be deleted.

    Login or Signup to reply.
  1. Since you indicated that you want to do this for troubleshooting purposes, here’s an approach without much persistent setup / teardown (compared to the other answer suggesting usage of the Profiles feature).

    You can use the code --list-extensions and the --disable-extension <ext-id> extensions together.

    --disable-extension <ext-id>: Disable the provided extension. This option is not persisted and is effective only when the command opens a new window.

    So either you could write it all out manually (using VS Code itself with its multicursor editing / column (box) selection would help), or I imagine one could do something like this (example that starts VS Code with all extensions disabled except the cSpell extension):

    code $(code --list-extensions | grep -v 'streetsidesoftware.code-spell-checker' | xargs -I % echo '--disable-extension %')
    

    If you want to ignore multiple extensions, switch to grep’s regex mode and use the | operator, or pipe through multiple grep -v commands.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search