Go Down

Topic: How add extensions to Visual Studio Code through command line? (Read 565 times) previous topic - next topic

apollodriver

good day  dear community,


well it is well described to install and extend vscode on win-boxes.

i run linux and i also want to run vscode:

the question is: some recommeend to use vsc as vscodium - see http://www.vscodium.com


today i am interested in extending VScode: How add extensions to Visual Studio Code through command line? the question is: It is possible to compile Visual Studio Code and install it through terminal as explained

here https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source   

and  here https://askubuntu.com/questions/616075/how-do-i-install-visual-studio-code


i have heard that VSCode is available as DEB-file. You can download it and then run:

Code: [Select]

sudo dpkg -i ~/path/to/code_1.XXX.deb


In case dpkg complains about missing dependencies, run:

Code: [Select]

sudo apt -f install


afterwards to do some configurations on the installation:


(Optional) Create a symbolic link to conveniently run code from the terminal:
Code: [Select]

sudo ln -s /path/to/VSCode/code /usr/local/bin/code



further source (install instructions): https://code.visualstudio.com/docs/setup/linux

Code: [Select]

code -h



(A man pages doesn't exist.)
Code: [Select]

Extensions Management:
  --extensions-dir <dir>                                         Set the root path for extensions.
  --list-extensions                                              List the installed extensions.
  --show-versions                                                Show versions of installed extensions, when
                                                                 using --list-extension.
  --install-extension (<extension-id> | <extension-vsix-path>)   Installs an extension.
  --uninstall-extension (<extension-id> | <extension-vsix-path>) Uninstalls an extension.
  --enable-proposed-api <extension-id>                           Enables proposed API features for an extension.
Hence all you need is the extension-id or extension-vsix-path and then

code --install-extension (<extension-id> | <extension-vsix-path>)
E.g. the ms-python package can be installed by
code --install-extension ms-python.python



Now I wonder, does anyone know how is it possible to install/add extensions to Visual Studio Code through Terminal?


WPGear.org is a compendium of useful developer tools for working with WordPress.

Go Up