Attaching Visual Studio Code(Text Editor) to a running container
Nowadays, every project has a docker image, to ease out the local setup and deployment process. We can attach these running container to our editor and can do changes on the go. We will be talking about the VS Code editor and how to use it to attach to the running container.
First thing first, run your container image and open up the VS Code editor, you will require to install following plugin
Now, after installing these plugins, follow the steps below.
- Press the
F1key to open Command Palette and choose Remote-Containers: Attach to Running Container...
- Choose your running container from the list, and voilà.
- After this step, a new VS Code editor will open, which will be connected to your code.
- You need to re-install plugin for this again form marketplace.
After this, you are all set to playground the code.