aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/zip/src/main
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2017-08-24 01:24:03 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2017-08-24 01:26:21 +0530
commitfbde78843d35c2c233c9e9dfcd43214f5893ac89 (patch)
tree8c8edc3040856e541278d9addd1568623ab700b4 /deployment/zip/src/main
parente20611b107e2a07d12165227591e5da06fe1192c (diff)
Enable remote debugging for onapcli
Enable remote debugging for onapcli. Introduce following two environment variable: ONAP_CLI_DEBUG: set true to enable remote debugging. ONAP_CLI_DEBUG: set remote debugging port (default 5005). Issue-Id: CLI-36 Change-Id: I971d3bd22d283c44da307896c20ae75e42c51bef Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'deployment/zip/src/main')
-rw-r--r--deployment/zip/src/main/release/bin/onap.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/deployment/zip/src/main/release/bin/onap.sh b/deployment/zip/src/main/release/bin/onap.sh
index e8970848..9650ccd1 100644
--- a/deployment/zip/src/main/release/bin/onap.sh
+++ b/deployment/zip/src/main/release/bin/onap.sh
@@ -28,4 +28,10 @@ do
CLASSPATH=$CLASSPATH:$entry
done
-java -classpath $CLASSPATH org.onap.cli.main.OnapCli "$@"
+if [ "$ONAP_CLI_DEBUG" = "true" ]
+then
+ ${ONAP_CLI_DEBUG_PORT:=5005}
+ java -Xdebug -Xrunjdwp:transport=dt_socket,address=$ONAP_CLI_DEBUG_PORT,server=y -classpath $CLASSPATH org.onap.cli.main.OnapCli "$@"
+else
+ java -classpath $CLASSPATH org.onap.cli.main.OnapCli "$@"
+fi