Debug a Java application using a Dockerfile
Last modified: 08 March 2021
Required plugins: Docker (bundled)
You can use IntelliJ IDEA to debug a Java application running in a Docker container. This tutorial describes how to create a Dockerfile for running a simple Java console application inside a Docker container with OpenJDK 8 and then debug it by setting breakpoints in the source code and using a remote debug configuration.
For this tutorial, you will need to connect IntelliJ IDEA to a running Docker daemon as described in Enable Docker support.