7

I have a number of Docker containers (10) each running a Java service that makes up my system. To create these containers I use a couple of docker-compose files. Using the Docker Integration plugin for IntelliJ, I can now spool up these services to my remote server using the Docker-compose option (the images used are built outside of IntelliJ, using Gradle). Here are the steps I have done to achieve this:

  1. I have added a Docker server using the Docker Machine option to connect to the remote Docker daemon (message says Connection Successful).
  2. I have added a new Docker Compose configuration, using the server, specifying my compose files, and the services I want to start.

Now that I have the system controlled through IntelliJ, I have been trying to figure out how to attach the remote debugger to each of these services so that IntelliJ will hit my breakpoints.

Will I need to add the JVM args (-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005) to each service (container) and add the usual remote debug configuration for each service? Do I need to use a different address for each service? If so, how do I add these args? Surely with the Docker Integration plugin, there is an easier way to do this.

IntelliJ Idea v2018.1.5 (Community Edition)

Docker Integration v181.5087.20

MeanwhileInHell
  • 6,780
  • 17
  • 57
  • 106

0 Answers0