Vs code как установить плагины
Перейти к содержимому

Vs code как установить плагины

  • автор:

 

Extension Marketplace

The features that Visual Studio Code includes out-of-the-box are just the start. VS Code extensions let you add languages, debuggers, and tools to your installation to support your development workflow. VS Code’s rich extensibility model lets extension authors plug directly into the VS Code UI and contribute functionality through the same APIs used by VS Code. This article explains how to find, install, and manage VS Code extensions from the Visual Studio Code Marketplace.

Browse for extensions

You can browse and install extensions from within VS Code. Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command ( ⇧⌘X (Windows, Linux Ctrl+Shift+X ) ).

This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.

popular extensions

Each extension in the list includes a brief description, the publisher, the download count, and a five star rating. You can select the extension item to display the extension’s details page where you can learn more.

Note: If your computer’s Internet access goes through a proxy server, you will need to configure the proxy server. See Proxy server support for details.

Install an extension

To install an extension, select the Install button. Once the installation is complete, the Install button will change to the Manage gear button.

Find and install an extension

For example, let’s install the popular TODO Highlight extension. This extension highlights text like ‘TODO:’ and ‘FIXME:’ in your source code so you can quickly find undone sections.

TODO Highlight extension highlighting in the editor

In the Extensions view ( ⇧⌘X (Windows, Linux Ctrl+Shift+X ) ), type ‘todo’ in the search box to filter the Marketplace offerings to extensions with ‘todo’ in the title or metadata. You should see the TODO Highlight extension in the list.

Search for todo in the Extensions view

An extension is uniquely identified by its publisher and extension IDs. If you select the TODO Highlight extension, you will see the Extension details page, where you can find the extension ID, in this case, wayou.vscode-todo-highlight . Knowing the extension ID can be helpful if there are several similarly named extensions.

TODO Highlight extension details with extension ID highlighted

Select the Install button, and VS Code will download and install the extension from the Marketplace. When the installation is complete, the Install button will be replaced with a Manage gear button.

To see the TODO Highlight extension in action, open any source code file and add the text ‘TODO:’ and you will see the text highlighted.

The TODO Highlight extension contributes the commands, TODO-Highlight: List highlighted annotations and TODO-Highlight: Toggle highlight, that you can find in the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ). The TODO-Highlight: Toggle highlight command lets you quickly disable or enable highlighting.

TODO Highlight commands in the Command Palette

The extension also provides settings for tuning its behavior, which you can find in the Settings editor ( ⌘, (Windows, Linux Ctrl+, ) ). For example, you might want the text search to be case insensitive and you can uncheck the Todohighlight: Is Case Sensitive setting.

TODO Highlight settings in the Settings editor

If an extension doesn’t provide the functionality you want, you can always Uninstall the extension from the Manage button context menu.

Uninstall the TODO Highlight extension

This has been just one example of how to install and use an extension. The VS Code Marketplace has thousands of extensions supporting hundreds of programming languages and tasks. Everything from full featured language support for Java, Python, Go, and C++ to simple extensions that create GUIDs, change the color theme, or add virtual pets to the editor.

Extension details

On the extension details page, you can read the extension’s README and review the extension’s:

  • Feature Contributions — The extension’s additions to VS Code such as settings, commands and keyboard shortcuts, language grammars, debugger, etc.
  • Changelog — The extension repository CHANGELOG if available.
  • Dependencies — Lists if the extension depends on any other extensions.

extension contributions

If an extension is an Extension Pack, the Extension Pack section will display which extensions will be installed when you install the pack. Extension Packs bundle separate extensions together so they can be easily installed at one time.

Azure Tools extension pack

Extensions view filter and commands

You can filter the Extensions view with the Filter Extensions context menu.

Extensions view filter context menu

There are filters to show:

  • The list of currently installed extensions
  • The list of outdated extensions that can be updated
  • The list of currently enabled/disabled extensions
  • The list of recommended extensions based on your workspace
  • The list of globally popular extensions

You can sort the extension list by Install Count or Rating in either ascending or descending order. You can learn more about extension search filters below.

You can run additional Extensions view commands via the . View and More Actions button.

Through this context menu you can control extension updates, enable or disable all extensions, and use the Extension Bisect utility to isolate problematic extension behavior.

more dropdown

Search for an extension

You can clear the Search box at the top of the Extensions view and type in the name of the extension, tool, or programming language you’re looking for.

For example, typing ‘python’ will bring up a list of Python language extensions:

python extensions

If you know the exact identifier for an extension you’re looking for, you can use the @id: prefix, for example @id:octref.vetur . Additionally, to filter or sort results, you can use the filter and sort commands, detailed below.

Manage extensions

VS Code makes it easy to manage your extensions. You can install, disable, update, and uninstall extensions through the Extensions view, the Command Palette (commands have the Extensions: prefix) or command-line switches.

List installed extensions

By default, the Extensions view will show the extensions you currently have enabled, all extensions that are recommended for you, and a collapsed view of all extensions you have disabled. You can use the Show Installed Extensions command, available in the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ) or the More Actions ( . ) dropdown menu, to clear any text in the search box and show the list of all installed extensions, which includes those that have been disabled.

Uninstall an extension

To uninstall an extension, select the Manage gear button at the right of an extension entry and then choose Uninstall from the dropdown menu. This will uninstall the extension and prompt you to reload VS Code.

uninstall an extension

Disable an extension

If you don’t want to permanently remove an extension, you can instead temporarily disable the extension by clicking the gear button at the right of an extension entry. You can disable an extension globally or just for your current Workspace. You will be prompted to reload VS Code after you disable an extension.

If you want to quickly disable all installed extensions, there is a Disable All Installed Extensions command in the Command Palette and More Actions ( . ) dropdown menu.

Extensions remain disabled for all VS Code sessions until you re-enable them.

Enable an extension

Similarly if you have disabled an extension (it will be in the Disabled section of the list and marked Disabled), you can re-enable it with the Enable or Enable (Workspace) commands in the dropdown menu.

enable extension

There is also an Enable All Extensions command in the More Actions ( . ) dropdown menu.

Extension auto-update

VS Code checks for extension updates and installs them automatically. After an update, you will be prompted to reload VS Code. If you’d rather update your extensions manually, you can disable auto-update with the Disable Auto Updating Extensions command that sets the extensions.autoUpdate setting to false . If you don’t want VS Code to even check for updates, you can set the extensions.autoCheckUpdates setting to false.

Update an extension manually

If you have extensions auto-update disabled, you can quickly look for extension updates by using the Show Outdated Extensions command that uses the @outdated filter. This will display any available updates for your currently installed extensions. Select the Update button for the outdated extension and the update will be installed and you’ll be prompted to reload VS Code. You can also update all your outdated extensions at one time with the Update All Extensions command. If you also have automatic checking for updates disabled, you can use the Check for Extension Updates command to check which of your extensions can be updated.

Recommended extensions

You can see a list of recommended extensions using Show Recommended Extensions, which sets the @recommended filter. Extension recommendations can either be:

  • Workspace Recommendations — Recommended by other users of your current workspace.
  • Other Recommendations — Recommended based on recently opened files.

See the section below to learn how to contribute recommendations for other users in your project.

Ignoring recommendations

To dismiss a recommendation, select on the extension item to open the Details page and then select the Manage gear button to display the context menu. Select the Ignore Recommendation menu item. Ignored recommendations will no longer be recommended to you.

Ignore extension recommendation

Configuring extensions

VS Code extensions may have very different configurations and requirements. Some extensions contribute settings to VS Code, which can be modified in the Settings editor. Other extensions may have their own configuration files. Extensions may also require installation and setup of additional components like compilers, debuggers, and command-line tools. Consult the extension’s README (visible in the Extensions view details page) or go to the extension page on the VS Code Marketplace (click on the extension name in the details page). Many extensions are open source and have a link to their repository on their Marketplace page.

Command line extension management

To make it easier to automate and configure VS Code, it is possible to list, install, and uninstall extensions from the command line. When identifying an extension, provide the full name of the form publisher.extension , for example ms-python.python .

You can see the extension ID on the extension details page under the Marketplace Info.

extension identifier

Extensions view filters

The Extensions view search box supports filters to help you find and manage extensions. You may have seen filters such as @installed and @recommended if you used the commands Show Installed Extensions and Show Recommended Extensions. Also, there are filters available to let you sort by popularity or ratings and search by category (for example ‘Linters’) and tags (for example ‘node’). You can see a complete listing of all filters and sort commands by typing @ in the extensions search box and navigating through the suggestions:

intellisense on extension search filters

Here are the Extensions view filters:

  • @builtin — Show extensions that come with VS Code. Grouped by type (Programming Languages, Themes, etc.).
  • @disabled — Show disabled installed extensions.
  • @installed — Show installed extensions.
  • @outdated — Show outdated installed extensions. A newer version is available on the Marketplace.
  • @enabled — Show enabled installed extensions. Extensions can be individually enabled/disabled.
  • @recommended — Show recommended extensions. Grouped as Workspace specific or general use.
  • @category — Show extensions belonging to specified category. Below are a few of supported categories. For a complete list, type @category and follow the options in the suggestion list:
    • @category:themes
    • @category:formatters
    • @category:linters
    • @category:snippets

    These filters can be combined as well. For example: Use @installed @category:themes to view all installed themes.

    If no filter is provided, the Extensions view displays the currently installed and recommended extensions.

    Sorting

    You can sort extensions with the @sort filter, which can take the following values:

    • installs — Sort by Marketplace installation count, in descending order.
    • rating — Sort by Marketplace rating (1-5 stars), in descending order.
    • name — Sort alphabetically by extension name.

    sort by install count

    Categories and tags

    Extensions can set Categories and Tags describing their features.

    extension categories and tags

    You can filter on category and tag by using category: and tag: .

    Supported categories are: [Programming Languages, Snippets, Linters, Themes, Debuggers, Formatters, Keymaps, SCM Providers, Other, Extension Packs, Language Packs, Data Science, Machine Learning, Visualization, Notebooks, Education, Testing] . They can be accessed through IntelliSense in the extensions search box:

    categories debuggers

    Note that you must surround the category name in quotes if it is more than one word (for example, category:"SCM Providers" ).

    Tags may contain any string and are not provided by IntelliSense, so review the Marketplace to find helpful tags.

    Install from a VSIX

    You can manually install a VS Code extension packaged in a .vsix file. Using the Install from VSIX command in the Extensions view command dropdown, or the Extensions: Install from VSIX command in the Command Palette, point to the .vsix file.

    You can also install using the VS Code —install-extension command-line switch providing the path to the .vsix file.

    You may provide the —install-extension multiple times on the command line to install multiple extensions at once.

    If you’d like to learn more about packaging and publishing extensions, see our Publishing Extensions article in the Extension API.

    Workspace recommended extensions

    A good set of extensions can make working with a particular workspace or programming language more productive and you’d often like to share this list with your team or colleagues. You can create a recommended list of extensions for a workspace with the Extensions: Configure Recommended Extensions (Workspace Folder) command.

    In a single folder workspace, the command creates an extensions.json file located in the workspace .vscode folder where you can add a list of extensions identifiers (.).

    In a multi-root workspace, the command will open your .code-workspace file where you can list extensions under extensions.recommendations . You can still add extension recommendations to individual folders in a multi-root workspace by using the Extensions: Configure Recommended Extensions (Workspace Folder) command.

    An example extensions.json could be:

    which recommends a linter extension and a code formatter extension.

    An extension is identified using its publisher name and extension identifier publisher.extension . You can see the name on the extension’s detail page. VS Code will provide you with auto-completion for installed extensions inside these files.

    Extension identifier.

    VS Code prompts a user to install the recommended extensions when a workspace is opened for the first time. The user can also review the list with the Extensions: Show Recommended Extensions command.

    Show Recommendations

    Next steps

    Here are a few topics you may find interesting.

      — Start learning about the VS Code extension API. — Try creating a simple Hello World extension. — Publish your own extension to the VS Code Marketplace.

    Common questions

    Where are extensions installed?

    Extensions are installed in a per user extensions folder. Depending on your platform, the location is in the following folder:

    • Windows %USERPROFILE%\.vscode\extensions
    • macOS

    You can change the location by launching VS Code with the —extensions-dir <dir> command-line option.

    Whenever I try to install any extension, I get a connect ETIMEDOUT error

    You may see this error if your machine is going through a proxy server to access the Internet. See the Proxy server support section in the setup topic for details.

    Can I download an extension directly from the Marketplace?

    Some users prefer to download an extension once from the Marketplace and then install it multiple times from a local share. This is useful when there are connectivity concerns or if your development team wants to use a fixed set of extensions.

    To download an extension, navigate to the details page for the specific extension within the Marketplace. On that page, there is a Download Extension link in the Resources section, which is located on the right-hand side of the page.

    Once downloaded, you can then install the extension via the Install from VSIX command in the Extensions view command dropdown.

    Can I stop VS Code from providing extension recommendations?

    Yes, if you would prefer to not have VS Code display extension recommendations in the Extensions view or through notifications, you can modify the following settings:

    • extensions.showRecommendationsOnlyOnDemand — Set to true to remove the RECOMMENDED section.
    • extensions.ignoreRecommendations — Set to true to silence extension recommendation notifications.

    The Show Recommended Extensions command is always available if you want to see recommendations.

    Can I trust extensions from the Marketplace?

    The Marketplace runs a virus scan on each extension package that’s published to ensure its safety. The virus scan is run for each new extension and for each extension update. Until the scan is all clear, the extension won’t be published in the Marketplace for public usage.

    The Marketplace also prevents extension authors from name-squatting on official publishers such as Microsoft and RedHat.

    If a malicious extension is reported and verified, or a vulnerability is found in an extension dependency:

     

    1. The extension is removed from the Marketplace.
    2. The extension is added to a kill list so that if it has been installed, it will be automatically uninstalled by VS Code.

    The Marketplace also provides you with resources to make an informed decision about the extensions you install:

    • Ratings & Review — Read what others think about the extension.
    • Q & A — Review existing questions and the level of the publisher’s responsiveness. You can also engage with the extension’s publisher(s) if you have concerns.
    • Issues, Repository, and License — Check if the publisher has provided these and if they have the support you expect.

    If you do see an extension that looks suspicious, you can report the extension to the Marketplace with the Report Abuse link at the bottom of the extension More Info section.

    Расширения VS Code, которые необходимо установить в первую очередь.

    Сейчас среди разработчиков очень популярны продукты компании JetBrains, они предлагают отличные инструменты для разработки под различные языки программирования.

    Правда большинство пользователей использует лишь часть возможностей IDE. Сразу возникает вопрос, если пользоваться ее возможностями на 20 — 30%, то какой смысл платить за нее ежегодно?

    Почти все возможности, которым требуются большинству пользователей IDE, можно получить в бесплатном редакторе кода Visual Studio Code или просто VS Code с помощью плагинов.

    Ниже я опишу плагины, которые я рекомендую установить сразу же после установки VS Code. Эти плагины я считаю универсальными и они будут помогать вам в не зависимости от того, с каким языком программирования вы работаете.

    Другими словами, это список «обязательных» плагинов для VS Code, а дальше каждый выбирает себе дополнительные плагины под конкретные задачи.

    Как устанавливать расширения VS Code?

    Все расширения устанавливаются автоматически из маркетплейса https://marketplace.visualstudio.com/.

    По комбинации клавиш Ctrl+Shift+X переходим во вкладку с расширениями, в строке поиска вводим название нужного расширения (все названия я указал ниже) и нажимаем Install. Иногда после установки расширения потребуется перезагрузить VS Code.

    «Обязательные» расширения для VS Code

    Русский язык для VS Code

    Этот плагин я не считаю обязательный, но многие его устанавливают в первую очередь, он называется Russian Language Pack for Visual Studio Code — это русификатор VS Code.

    Auto Complete Tag

    В это расширение входят 2 очень полезных плагина Auto Close Tag и Auto Rename Tag. Первый чтобы автоматически закрывать теги не только в html, но и в многих других языках. Второй для автоматического переименования тегов. Например вы меняете открывающий тег и сразу автоматически меняется закрывающий.

    Bracket Pair Colorizer

    Разукрашивает скобки, в том числе квадратные и фигурные, в разные цвета в зависимости от вложенности. Это улучшает ориентацию в коде.

    Работа расширения Bracket Pair Colorizer

    Better Comments

    Для лучшего визуального выделения каких либо пометок в комментариях рекомендую использовать этот плагин.

    С помощью этого расширения можно выделить комментарий, TODO, вопрос.

    Для этого в начале комментария нужно поставить соответствующий знак:

    • ! — текст будет красный
    • ToDo — оранжевый
    • ? — синий.

    Работа расширения Better Comments

    Indenticator

    Это расширение так же помогает улучшить восприятие кода, оно визуально выделяет текущую глубину отступа. Это помогает различать блоки, расположенные на разных уровнях.

    Project Manager

    Добавляет функционал по управлению проектами в VS Code, как во всех IDE. Установим его и в панели действий появится иконка папочек. Это и есть наш Project Manager.

    Bookmarks

    Еще одна вещь, которой я постоянно пользуюсь в PHP Storm, это закладки в коде. В VS Code такой функционал можно добавить с помощью расширения Bookmarks.

    Работа расширения Bookmarks

    IntelliJ IDEA Keybindings

    Если до этого вы работали с какой нибудь из IDE от JetBrains и привыкли к ее горячим клавишам, рекомендую установить это расширение.

    Если найду какие то еще интересные расширения, которые можно будет отнести к «обязательным», то дополню статью.

    smiley

    Только не забывайте, что чем больше установлено расширений, тем больше оперативной памяти отжирается и медленней работает VS Code, поэтому периодически проверяйте, если у вас установлены расширения, которыми вы не пользуетесь, удаляйте их. В любом случае, если вам понадобится их вернуть, сделать это не сложно

    How to Install Visual Studio Code Extensions

    Microsoft’s Visual Studio Code is perhaps the most popular open source code editor, after Vim (of course).

    Visual Studio Code provides an amazing “out of the box” experience by providing almost all of the IDE like features. But there are always things you wish Visual Studio Code could do. “The grass is always greener on the other side.”

    The Visual Studio Code Marketplace is exactly where you will find the extensions for Visual Studio Code. Extensions that are published on the Visual Studio Code Marketplace are scanned for viruses before they are published. So these extensions can be trusted.

    Installing extensions in Visual Studio Code

    You don’t need to go to the Marketplace website for installing extensions. You can install and manage extensions right from the editor itself.

    I hope you have Visual Studio Code installed on Linux or whichever operating system you are using.

    Open Visual Studio Code, and to the left most side, is the Activity Bar. The last button on the Activity Bar is the Extensions button. Clicking on that will expose you to the enormous wealth of the extensions available for installation on Visual Studio Code.

    01 all extensions 1

    Accessing the Extensions tab in VS Code

    You can also press the Shortcut Key combination Ctrl + Shift + X to launch the Extensions side pane.

    If you do not have any extensions installed, you will see a list of the most popular extensions available on the Visual Studio Code Marketplace. There are extensions you wish Visual Studio Code already had. And then, some day you will discover an extension and wonder how you lived without it!

    Find an extension and install it from the editor (GUI method)

    Now is the time to try out that vim thing Linux people talk about *nudge nudge* 😉

    Just kidding. Let us install something more beginner friendly and something that a beginner can easily take advantage of, without much practice.

    Click on Visual Studio IntelliCode (#1) extension from the list presented of the most popular extensions.

    02 select intellicode 1

    How to install an extension like Visual Studio IntelliCode

    Simply clicking on the Install button (#2) will install the Visual Studio IntelliCode extension. This extension gives you AI-predicted suggestions while you are writing code.

    Once installed, you will be able to take full advantage of this extension. Try typing a block of code in your preferred programming language and check if the suggested AI autocomplete is working out for you, and not causing any kind of slowdown in your workflow.

    03 intellicode installation done 1

    Managing an installed extension in Visual Studio Code

    If you dislike any of the installed extension, you can simply click on the Uninstall button (#2) to completely remove the unwanted extension.

    If you have multiple extensions installed, and if you feel like one of the installed extensions is causing you problems – say like sudden crashes; You can simply disable one (or multiple) extension(s) simply by clicking on the Disable button (#1) and check if extension x was acting up or was it extension y, or was it something different altogether.

    Considering that extension removal and re-installation takes a long time, disabling extensions can be handy when you have multiple extensions installed.

    Alternate method: Install extensions using the terminal

    Did you know you could install a Visual Studio Code extension from the terminal itself? Well, now you do!

    To install an extension from your terminal, you need to know the extension name and publisher name in the order of publisher.extension . For an example, if you want to install the same extension as you did before, Visual Studio IntelliCode, it’s publisher name and extension name is VisualStudioExptTeam.vscodeintellicode .

    To find out this unique identifier of any extension, firstly, visit the Visual Studio Code Marketplace in your browser of choice.

    visual studio code marketplace

    A screenshot of what Visual Studio Code Marketplace looks like

    Then search for any extension, for this tutorial, I will focus on installing Visual Studio IntelliCode. And then open the page of the extension that you want to install.

    visual stuido code ext search

    Search for Visual Studio IntelliCode and open the extension webpage

    Once you have the web page of your extension open, you will see a code block. In the screenshot of the extension web page below is the highlighted unique identifier of the extension.

    vs code extension identifier

    Unique identifier of the extension Visual Studio Code

    Once you have the unique code of the extension you desire to install – VisualStudioExptTeam.vscodeintellicode in this case, you can proceed by running the following command in your terminal.

    Like the GUI, the command line interface also allows you to install, disable, remove and manage extensions.

    There is a handy flag that will give you a list of all the extensions you have installed. You can do that by running the following command:

    To disable a single extension, run this command:

    If you want to disable all extensions, you can run the following command:

    The above command will disable all installed extensions. This will help you diagnose if extensions are causing problems or is it Visual Studio Code itself.

    Now, if you want to completely remove any extension, use this command:

    Conclusion

    I find it much easier to use the editor for installing VS Code extensions. It’s straight in the editor where I code after all.

    Once you are comfortable tinkering with Visual Studio Code, maybe checkout this article pointing out some useful keyboard shortcuts for Visual Studio Code that might help you get even more productive!

    VS Code How to Install Extensions

    Visual Studio Code is a sophisticated piece of software that most people use to start their programming journey. Its robust features, cross-compatibility, the range of programming languages make it one of the most used programming tools in the world.

    VS Code How to Install Extensions

    While VS Code has a vast array of features to begin with, its functionality can be further improved through the use of extensions, which can add additional languages, compilers, and other tools that improve a programmer’s workflow.

    In this article, we’ll be showing you how to install extensions in VS Code, as well as discuss some of the most useful and popular extensions.

    How to Install Extensions in VS Code

    VS Code has an integrated extension marketplace that is used to find, install, and/or manage your extensions. Here’s how to install an extension via the VS Code Marketplace:

    1. Click on the “Extensions” button in the Activity Bar. It’s located on the side of VS Code’s client. Alternatively, you can use the keyboard shortcut “Ctrl+Shift+X” to open the “Extensions” screen.
    2. This will bring you to the “Extensions” list. VS Code automatically sorts Extensions by popularity. You can also use the search box on the top of the page to filter your results.
    3. Each extension in the list will have a brief description, the download count (the number of times it has been downloaded), the publisher’s name, and a rating from zero to five stars.
    4. You can click each extension on the list to see more details before committing to a download. Details include a changelog, frequently asked questions, and a list of contributions and dependencies the extension gives to and requires from VS Code, respectively.
    5. If you’re using a proxy to access the internet, you’ll need to set up VS Code to use a proxy server as well to connect to the internet and download extensions.
    6. Once you’ve found an extension you like to install, click on its details.
    7. You’ll see an “Install” button under the extension’s name.
    8. Click the “Install” button, and the extension will automatically download and install on your device.
    9. The “Install” button will now change to a “Manage” button that looks like a gear.

    Extensions are a great way to customize and enhance the capabilities of VS Code to suit your personal or professional needs. A computer that is connected to the internet without a proxy server will usually have no problems downloading and installing extensions automatically through the integrated marketplace.

    Do note that some extensions might require other extensions to be installed beforehand to function. A complete list of an extension’s dependencies can be found on its details page.

    Other methods exist that can help users get VS Code extensions and don’t require an internet connection.

    How to Download Extensions for VS Code

    If you need a VS Code extension for a device that isn’t connected to the internet, there is a workaround to accessing the extensions, however, you will need a second device with internet access. Here’s what you need to do:

    1. On the device with an active internet connection, open a browser of your choice and go to VS Code Marketplace’s URL.
    2. Use the search function to specify your preferences. Alternatively, the marketplace lists most popular and useful items directly.
    3. Click on the extension in which you’re interested. This will open a page that shows more details about the extension, including a brief description, the publisher’s name, tabs that show some FAQs, and a complete version changelog.
    4. Click on the “Download Extension” button on the right side of the page. Don’t click on the “Install” button on the top, as it will begin to install the extension on the current device.
    5. The download will produce a .VSIX file that can be transferred to the machine that needs it.

    Downloading an extension in this manner does not install it. The .VSIX file is not readable by any program other than the one being used to install the VS Code extension. If you open the .VSIX file manually, you might receive errors.

    How to Install Extensions Offline for VS Code

    While most computers these days are connected to the internet, some devices don’t have that connection for safety and security reasons or specific professional needs. Thankfully, the machine doesn’t have to be connected to the internet to install an extension. However, you still need a way to download the extension.

    Use the steps outlined in the previous section of this article to download the extension on a different, connected device and then copy the generated .VSIX file. For obvious reasons, use a transfer medium that doesn’t depend on an internet connection, such as a USB drive or an external HDD or SSD.

    Do note that if the extension has dependencies, you’ll need to download them as well and install them first.

    Once the extension is transferred to the machine you want to install it on, follow these steps:

    1. The first option to installing the new extension should be to open the extension’s .VSIX file. If VS Code is installed on the device, older versions of the software will be able to install the extension manually from here. Follow the installation prompts to integrate the extension into VS Code successfully. If the extension is installed, you can ignore the other steps.
    2. If the above method doesn’t work, there is a workaround. Follow these steps.
      1. Open VS Code.
      2. Open the “Extensions” sidebar (you can use “Ctrl+Shift+X”).
      3. Click on the ellipsis icon in the top right corner of the menu.
      4. Select “Install from VSIX…”
      5. VS Code will open a document browser. Locate the .VSIX file you transferred and select it.
      6. VS Code will now begin the installation process of the extension.
      7. After the extension has been installed, you’ll be able to see it in the “Extensions “menu and manage it accordingly.

      How to Install an Extension in VS Code with Command Prompt

      For the more tech-savvy among you, VS Code has a command prompt integration that allows most of its functions to be replicated with command lines.

      Here’s how to open the command prompt in VS Code:

      1. Use the “Ctrl+`” (backtick) keyboard shortcut.
      2. Go to “View,” and then select “Terminal” in the menu.
      3. Use the command palette (“Ctrl+Shift+P”) and then use “View: Toggle Integrated Terminal.”

      When the command prompt is opened, use the following command to install new extensions:

      “–install-extension <ext> “

      You need to provide the full name of the extension, replacing the “<ext>” argument, which is usually in the format of “publisher.extension”. The extension’s full name can also be found in the URL of the extension on the VS Code Marketplace, after the “itemName=” argument.

      How to Install Extensions in VS Code for All Users

      Suppose the machine that is running VS Code is used by different people using separate profiles to access it. In that case, not all of them will get the extension installed when the process is performed automatically. VS Code’s integrated marketplace will only install the extension on the current user’s instance of the program. The installation would then need to be repeated for each user that needs the extension.

      However, there is a workaround that will install the extension for all users on the machine. Here’s what you need to do:

      1. Use the online VS Code marketplace to download the extension’s .VSIX file, as described in the “How to Download Extensions for VS Code” section above.
      2. Locate the application named “VSIXInstaller.exe”.
      3. Use the “/admin” parameter when calling the installer to install the extension for all users. For example: “VSIXInstaller.exe /admin file_path.vsix”. You can use VS Code’s command prompt to try and expedite this process.

      Some extensions come with their installers attached, which will allow you to install them for all users if correct checks are marked during installation.

      If the above methods don’t work, the only solution is to manually use the .VSIX installation method outlined in “Offline” or “Command Prompt” segments.

      How to Manage Extensions in VS Code

      Managing extensions allows you to get the most out of your VS Code platform. Each extension can be enabled, disabled, or uninstalled directly from the “Extensions” menu:

      1. Open the “Extensions” menu.
      2. The listed extensions are usually in the enabled > disabled > recommended order.
      3. If you want to manage an extension, press the gear icon on the right side of its entry in the list, then select the desired management options from the dropdown list.

      Alternatively, you can see and manage extensions from the command prompt. If you prefer to use the command prompt to manage your extensions, here are some of its additional functionalities:

      1. “–uninstall-extension <ext>” uninstalls the extension. Use the full extension name in the “<ext>” argument, similar to when you installed it.
      2. “–list-extensions” will list all installed extensions on the device.
      3. “–show-versions” can be used in conjunction with the list command to show the versions of the extensions that are installed. This can be useful to determine if some extensions need to be updated.
      4. “–disable-extensions” will disable all extensions. VS Code will still list them as “Disabled” in the “Extensions” menu, but the extension won’t be active.
      5. “–enable-proposed-api <ext>” enables the extension’s proposed API features. You need to provide the full name of the extension for the “<ext> “argument.

      The Command Prompt has many uses outside of managing extensions, which might be covered on a different occasion.

      How to Uninstall an Extension from VS Code

      Over the course of your programming life, there may be additional extensions you don’t need, or you’ll come across ones that have more capabilities and make others redundant. Here’s how to uninstall extensions:

      1. Open VS Code.
      2. Open the “Extensions” menu.
      3. Select the gear icon next to the extension you wish to remove.
      4. Select the “Uninstall” option to remove the extension from your device. This will prompt you to reload VS Code.
      5. Alternatively, use the “–uninstall-extension <ext>” command in VS Code’s terminal. Provide the full name of the extension (publisher.extension) for the “<ext>” argument.

      As an alternative to uninstalling an extension, you can use the “Disable” option to keep the extension installed but prevent it from making a change in your VS Code projects. Extensions can be re-enabled at a later date using the “Enable” button.

      How to Update an Extension Manually in VS Code

      By default, VS Code automatically updates all installed extensions whenever a new version becomes available on the marketplace. However, for machines without internet access or with auto-updates disabled, there is a way to update an extension manually. Here’s what you need to do:

      1. If the machine has internet access, use the “@outdated” filter in the “Extensions” search bar. This will list the extensions that require an update. Click the “Update” button on the extension details to update it and force VS Code to reload. Alternatively, use the “Update All Extensions” command to update all outdated extensions. If you have automatic checking disabled, you need to use the “Check for Extension Updates” command in the menu.
      2. If the machine doesn’t have internet access, you’ll need to download the proper extension version elsewhere, then uninstall the outdated version from the machine and install the up-to-date one afterwards.

      What to Do If VS Code Fails to Install an Extension

      If VS Code fails during the installation process, there are a few things you can try out to fix it:

      1. Check for dependencies. Some extensions require other extensions to work properly, or in some cases, even install.
      2. Check for your proxy server. You’ll need to configure VS Code to use the same proxy server.
      3. Change your DNS settings to 8.8.8.8 and 8.8.4.4. These settings can be found on your “Internet Settings > Change” adapter options.

      Get Coding with VS Code

      VS Code is a sophisticated piece of software that allows you to program in all sorts of languages and use its extensive features. The extensions are a great way to customize and improve VS Code’s functions and performance. Good extensions will boost your workflow tremendously, so be on the lookout for new extensions to install.

      What extensions do you use on your VS Code? Let us know in the comment section below.

       

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *