My question is, if I can run Java and Debug it from within Visual Studio Code. I can edit my code and then start it in a container. But is it also possible to run the docker container, having a volume with the code folder mounted into the container and then configure Visual Studio Code somehow to use Java from the container? I saw there is the .vscode folder with launch.json or settings.json, but I found no way so far to use the run/debug command and use Java from within the Docker container. I was looking for a way to use java 11 without breaking my current config.
Your best option really is to use the Remote Development extension pack for Visual Studio Code, and then use Docker containers.
See this sample for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With