diff --git a/docs/assets/intellij-remote-debug.png b/docs/assets/intellij-remote-debug.png new file mode 100644 index 0000000000..1aa1b023a7 Binary files /dev/null and b/docs/assets/intellij-remote-debug.png differ diff --git a/docs/guide/dev-environment.md b/docs/guide/dev-environment.md index 527dc8dffd..d9fa4d7778 100644 --- a/docs/guide/dev-environment.md +++ b/docs/guide/dev-environment.md @@ -43,6 +43,14 @@ By default, the version of GeoNetwork used as a backend is 4.2.2. You can specif $ GEONETWORK_VERSION=4.2.5 docker compose up -d ``` +### Remote debugging of GeoNetwork + +When using an IDE that supports Java remote debugging (e.g. IntelliJ IDEA), it is possible to connect to the running GeoNetwork instance by creating a "Remote JVM Debug" configuration pointing on the `5005` port; This could for example look like so: + +![intellij-remote-debug.png](..%2Fassets%2Fintellij-remote-debug.png) + +Then, the remote debugger will be able to attach to GeoNetwork once it's running and you will be able to create breakpoints and inspect the running code. + ## GeoNetwork-UI code ### Applications diff --git a/support-services/docker-compose.yml b/support-services/docker-compose.yml index 8ee3b01ff6..5bcc64c8ea 100644 --- a/support-services/docker-compose.yml +++ b/support-services/docker-compose.yml @@ -80,6 +80,15 @@ services: GEONETWORK_DB_NAME: geonetwork GEONETWORK_DB_USERNAME: geonetwork GEONETWORK_DB_PASSWORD: geonetwork + JAVA_OPTS: > + -Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF + -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true + -Xms512M -Xss512M -Xmx2G -XX:+UseConcMarkSweepGC + -Dgeonetwork.resources.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/data/resources + -Dgeonetwork.data.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/data + -Dgeonetwork.codeList.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/codelist + -Dgeonetwork.schema.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/schema_plugins + -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005 depends_on: database: condition: service_healthy @@ -98,6 +107,7 @@ services: - geonetwork_data:/var/lib/jetty/webapps/geonetwork/WEB-INF/data/ ports: - '8080:8080' + - '5005:5005' init-pipeline: image: geonetwork/geonetwork-ui-tools-pipelines:latest