Docker container remote debugging
Docker container remote debugging.
-
In the Docker Compose file, add:
ports: - "5005:5005" environment: - JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" -
Verify connectivity with:
nc -zv localhost 5005
-
In IntelliJ, open Edit Configurations and set it up as shown in the picture:

-
Click the Debug button.