VS Code uses a locally installed version of node for debugging. My question is whether it is possible to use node in a docker container instead.
I've found several references on doing something like this with the remote debugging approach vscode offers. This seems to be pretty close to what I'm looking for. However, I don't want to start the container externally.
My example is the simple hello world from vscode docs. I really would love to simply press the launch button and start debugging in it without having a locally installed version of node.
-
Just came across vscode tasks. This seems to be what I'm looking for. However, it doesn't seem to be able to start a docker container. Will have to further explorer on this.Jan Suchotzki– Jan Suchotzki2016年08月04日 09:18:13 +00:00Commented Aug 4, 2016 at 9:18
2 Answers 2
I'm not aware of any way to launch the container from the debugger in Visual Studio Code. However, for Visual Studio Community, there is the Docker Tools for Visual Studio plugin.
Comments
Have a look at this one, I think it is what you are looking for: https://alexanderzeitler.com/articles/debugging-a-nodejs-es6-application-in-a-docker-container-using-visual-studio-code/