VSCode / Docker devcontainer.json Issue

Viewed 1011

Within VSCode there is an extention Remote - Containers with option to save the installed extensions to a file name devcontainer.json. This allows VSCode to install the necessary extensions when you are using a container-based environment.

However, this is not working. When I select the following option, no file is created. Or if I create the file it is not updated.

Add to container.json option

My VSCode setup is: * Win10 * VSCode 1.44.2 * This is being performed via the WSL2 remote connection.

Many Thanks,

1 Answers

Indeed Remote - Containers fails to put extensions' ids into devcontainer.json... unless you create the .devcontainer/devcontainer.json AND unless you put there some content:

{
  "extensions": []
}

should be enough.
Actually, even

{
}

is enough.

Related