From 564c2bf7175d36f15116973ce7ae746e7b4de681 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Wed, 17 Apr 2024 11:15:39 +0200 Subject: [PATCH] Update debugging.md --- .../user_and_programmer_guide/debugging.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/cygnus-ngsi/user_and_programmer_guide/debugging.md b/doc/cygnus-ngsi/user_and_programmer_guide/debugging.md index c12cdbf64..e6e3221b9 100644 --- a/doc/cygnus-ngsi/user_and_programmer_guide/debugging.md +++ b/doc/cygnus-ngsi/user_and_programmer_guide/debugging.md @@ -25,7 +25,7 @@ cygnus: volumes: - ${CYGNUS_CONF}/agent.conf:/opt/apache-flume/conf/agent.conf environment: - - CYGNUS_JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6006 + - CYGNUS_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:6006 - CYGNUS_SKIP_CONF_GENERATION=true log_driver: json-file log_opt: @@ -53,6 +53,17 @@ Warning: JAVA_HOME is not set! Listening for transport dt_socket at address: 6006 ``` +## Attaching java jdb debugger +``` + jdb -attach 127.0.0.1:6006 +``` +``` +Set uncaught java.lang.Throwable +Set deferred uncaught java.lang.Throwable +Initializing jdb ... +> +``` + ## Attaching IntelliJ debugger. Once the container is up and running it's time to setup IntelliJ. @@ -91,4 +102,4 @@ When de debugger is attached you will see the output: Connected to the target VM, address: 'localhost:6006', transport: 'socket' ``` -This means the IntelliJ debugger attached successfully to the container. \ No newline at end of file +This means the IntelliJ debugger attached successfully to the container.