In order to enable the IDE (in this case IntelliJ) debugger to be connected to the docker instance, we will need to add the environment variableJAVA_TOOLS_OPTIONS with some specific value to the docker-compose.yml file.
In our case for connecting to port 50000:
"JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:50000"
Description
In order to enable the IDE (in this case IntelliJ) debugger to be connected to the docker instance, we will need to add the environment variable
JAVA_TOOLS_OPTIONS
with some specific value to thedocker-compose.yml
file.In our case for connecting to port
50000
:"JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:50000"