Black Pine

Docker container remote debugging

Docker container remote debugging.

  1. In the Docker Compose file, add:

    ports:
      - "5005:5005"
    environment:
      - JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
  2. Verify connectivity with:

    nc -zv localhost 5005

  3. In IntelliJ, open Edit Configurations and set it up as shown in the picture:

    Remote JVM debug

  4. Click the Debug button.