I am trying to set up a new dev environment using WSL, VSCode and docker. I have fixed connectivity issues(company always on VPN). I am able to run both docker compose(fetching images) and docker build(building them from scratch).
I want to develop in WSL environment, with code changes etc being done there, while debugging happens on container.
In old setup we were running IntelliJ with following steps:
- configure project at ‘srcxxx’ directory level
- run docker compose inside above path
- configure Python SDK:
- Go to FIle > ProjectStructure > Platform Settings > SDKs > + > Docker Compose
- Choose ‘spark’ in the Service field(name of one the containers from step 2)
- define some env variables like PYTHON BUFFERED, PYTHONPATH, SPARK_HOME and so on
- set up python interpreter path to /usr/bin/python3
- File > ProjectStructure > Project > Select SDK: “Remote Python 3.10.10 Docker Compose”
But I struggle how to set launch/settings/tasks.json files in order to mirror above setup in vscode.
I’ve tried a number of stack overflow threads and some vscode documentations.
Problem was that they were geared towards setting whole environment on a container, which is not what Im trying to do in here.
Was following recently Select interpreter of docker container in the vscode which was promising, but when I started playing with Remote-Containers I ran into an issue:
WSL is already remote. By selecting a new remote new vscode was running from different context and I no longer had access to repository that I have pulled for example.
I could use some pointers, while I’m not skilled with vscode setup I believe I struggle with naming my needs properly.
Thanks in advance!