I’m looking for guidance on debugging modules in containers.
I have an 8.3.3 gateway (port 8089) running in a container with modules that I’d like to debug in IntelliJ.
Note that I also have an 8.1 gateway (port 8088) running directly on my computer.
When launching the debugger from IntelliJ, it does start the designer from the correct gateway and allow me to run tests from the script console.
I can set breakpoints in IntelliJ, but it never stops at them, not even in the DesignerHook’s startup(…).
Here’s the services section from the .yml file:
services:
gateway:
<<: *ignition-opts
hostname: gateway
ports:
- 8089:8088
- 8001:8000
command: >
-n Ignition-standard
-m ${GATEWAY_MAX_MEMORY:-4096}
-r /restore.gwbk
-a gateway.localtest.me
-h 8088
-s 8043
--
wrapper.java.additional.1=-Ddata.dir=data
wrapper.java.additional.2=--add-opens=java.base/java.lang=ALL-UNNAMED
wrapper.java.additional.3=--add-opens=java.base/java.io=ALL-UNNAMED
wrapper.java.additional.4=--add-opens=java.base/java.security.cert=ALL-UNNAMED
wrapper.java.additional.5=--add-opens=java.base/java.util=ALL-UNNAMED
wrapper.java.additional.6=--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
wrapper.java.additional.7=--add-opens=java.base/sun.nio.fs=ALL-UNNAMED
wrapper.java.additional.8=--add-opens=java.base/java.lang.ref=ALL-UNNAMED
wrapper.java.additional.9=-Xdebug
wrapper.java.additional.10=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000
wrapper.java.additional.11=-Dignition.allowunsignedmodules=true
wrapper.java.additional.12=-Dia.developer.moduleupload=true
environment:
GATEWAY_NETWORK_REQUIRESSL: false
GATEWAY_NETWORK_SECURITYPOLICY: SpecifiedList
GATEWAY_NETWORK_WHITELIST: Ignition-gatewayr-backup,Ignition-standard-backup
volumes:
- gateway-data:/usr/local/bin/ignition/data
- ./gw-backup:/backup
- ./gw-init/base.gwbk:/restore.gwbk
- ./gw-init/gateway-${COMPOSE_PROFILES:-independent}.xml:/usr/local/bin/ignition/data/redundancy.xml