I'm wondering whether it is possible to have VS Code IntelliSense enabled when developing inside a Docker container where all the dependencies are locally installed?
I'm wondering whether it is possible to have VS Code IntelliSense enabled when developing inside a Docker container where all the dependencies are locally installed?
VS Code has recently launched its Visual Studio Code Remote - Containers extension:
The Visual Studio Code Remote - Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set.
But most importantly for your use case:
This lets VS Code provide a local-quality development experience — including full IntelliSense (completions), code navigation, and debugging — regardless of where your tools (or code) are located.
I made a screencast that shows that:
Here's the relevant configuration file .devcontainer.json at the root of the project:
{
"name": "My Project",
"image": "node:12-alpine"
}