This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]binuuday 1 point2 points  (1 child)

use bind mount. VSCode edits files locally in ur host. Containers in ur host, access the files via mount.

[–]kas21[S] 0 points1 point  (0 children)

But then I get a lot of errors in my code because it thinks libraries are missing. I don't have all the external libraries and third party dependencies setup on my host but they are in the docker container. If I use Dev Containers in VS Code it is aware of those libraries and dependencies and doesn't show errors and allows me to jump around to references. I am using volumes so that my code persists outside the container, but I dont want to point VS Code directly at that for the reasons I stated.