I know it is generally possible to connect to a container’s python interpreter with:
- remote containers
- remote ssh
The problems I have with these solutions:
- it opens a new window where I need to install/specify all extensions again
- it opens a new window per container. I am working in a monorepo where each services’s folder is mounted in a different container (connected via docker compose)
Is there a solution that allows me to specify a remote container to connect to simply for the python interpreter (and not for an entirely new workspace)?
2
Answers
As illustrated by this question, it is still not possible to open multiple remote (SSH/Container) inside the same VSCode workspace/window.
If possible, try and adapt your workflow to:
That way, you are decoupling:
You only need to do that once. Save your workspace and when you open the workspace next time it will have your configuration as you defined it
Can you clarify what you are trying to achieve? Is it for development or for connecting to running instances of your services to debug?
For debugging, have you read docs on attaching to containers started with docker compose?