> For the complete documentation index, see [llms.txt](https://burkeholland.gitbook.io/vs-code-can-do-that/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://burkeholland.gitbook.io/vs-code-can-do-that/exercise-6-remote-development/handling-extensions.md).

# Handling extensions

Extensions in your local VS Code are not installed by default in remote containers. You can install them from the extension explorer, or you can include them in the "devcontainer.json" file.

{% tabs %}
{% tab title="Exercise" %}

* Install the "Prettier" extension from the Extensions Explorer view
* Remove the extension
* Add it via the "devcontainer.json" file
* Rebuild the container
* Verify that the Prettier extension is present
  {% endtab %}

{% tab title="Answer" %}

* Open the Extensions Explorer view (**Cmd/Ctrl + Shift + X**)
* Find "Prettier" in the "Local - Installed" extensions section. Notice that is greyed out.

![](/files/-Lm6QzLKGGe50fePidgP)

* Click on the "Install on Dev Container" button in the Prettier extension to install it into the Dev Container.
* When the extension is finished installing, you will see a "Reload Required" on the Prettier extension page. Click it.

![](/files/-Lm6RI0u9iXniZ_UmXSY)

* VS code will reload
* Open the Extensions explorer view (**Cmd/Ctrl + Shift + P**)
* Notice that the Prettier extension is now installed

![](/files/-Lm6RXK4hyfQvk2zdoL9)

* Uninstall it by clicking on the "Uninstall" button on the Prettier extension page

![](/files/-Lm6Ren8Va9wTzDbciem)

* Click on the button that says "Reload Required"

![](/files/-Lm6Rl3pZRhku77gs970)

* The editor is reloaded, and the Prettier extension is no longer installed
* Open the "devcontainer.json" file
* In the section called "extensions", add in the ID of the Prettier extension
  * To find this, go to the Extensions Explorer (**Cmd/Ctrl + Shift + X**)
  * Find Prettier in the "Local - Installed" section
  * Click on it to open the Prettier extension page

![](/files/-Lm6SC7nkAVtOTufhmyU)

* Locate the ID next to the name

![](/files/-Lm6SLhgdjCgZM5UOsUE)

* Copy that value and paste it into the "devcontainer.json" file in the "extensions" section

```
"extensions": [
    "ms-azuretools.vscode-azurefunctions",
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode"
]
```

![](/files/-Lm6Scgl1DYtfv8nqd0h)

* Open the Command Palette (**Cmd/Ctrl + Shift + P**)
* Select "Remote-Containers: Rebuild Container"

![](/files/-Lm6SotBlpkDBiYJbr2S)

* VS Code will reload and rebuild the container
* Open the Extension Explorer view (**Cmd/Ctrl + Shift + X**)
* Notice that the Prettier extension was installed automatically by VS Code

![](/files/-Lm6TA8WlVJlm1zUNGql)
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://burkeholland.gitbook.io/vs-code-can-do-that/exercise-6-remote-development/handling-extensions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
