Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get intellisense in editor from compiled code in docker containers

I've been looking a while for this but don't seem to be able to find a decent solution without creating extra mess in my workspace.

Is it possible to use an editor, such as VSCode, and make its intellisense use compiled code that resides inside a docker container (or multiple)?

One way to perhaps accomplish is this by creating shared volumes that link the node_modules and the compiled folder.

In my workspace i'm using NodeJS, Npm modules and my editor of choice is, visual studio code. The workspace setup is launched using docker-compose

Any suggestion is welcome

like image 488
Maxim Avatar asked Nov 07 '22 19:11

Maxim


1 Answers

The VS Code Team recently announced Remote Development Extension Pack, which contains The 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 VS Code's full feature set.

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) is located.

source

Note that for now it requires the VS Code Insiders build

like image 182
Zaur Bogus Avatar answered Nov 14 '22 21:11

Zaur Bogus