aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-02-06 14:51:24 +0100
committerliu fengyun <liu@fengy.me>2017-02-10 19:26:07 +0100
commit6823e15cf08c68ca67f688159536f7a506d1969e (patch)
treed7eee103b65b74cd37a5e2dd0f652610cfd76776 /bin
parentb5a9c8c4d1f832f2cc024f9cfe855d6e57bd35f9 (diff)
downloaddotty-6823e15cf08c68ca67f688159536f7a506d1969e.tar.gz
dotty-6823e15cf08c68ca67f688159536f7a506d1969e.tar.bz2
dotty-6823e15cf08c68ca67f688159536f7a506d1969e.zip
fix #1484: position of while incorrect in debug
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dotr17
1 files changed, 16 insertions, 1 deletions
diff --git a/bin/dotr b/bin/dotr
index f00760006..e5a632565 100755
--- a/bin/dotr
+++ b/bin/dotr
@@ -8,6 +8,10 @@ fi
DOTTY_ROOT="$(dirname "$DOTTY_ROOT")"
DOTTY_ROOT="$( cd "$DOTTY_ROOT" >& /dev/null && pwd )/.." # absolute
+# debug
+DEBUG_STR=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
+DEBUG=
+
# Load common functions and variables
source "$DOTTY_ROOT"/bin/common
@@ -24,10 +28,21 @@ function runMain {
echo "java bin not detected - please specify with \$JAVA_BIN or install java to a default location"
exit 1
else
- eval "$jbin $CLASS_PATH $@"
+ eval "$jbin $DEBUG $CLASS_PATH $@"
fi
}
+# parse command line params -d to enable debugging
+while getopts "dx" opt; do
+ case "$opt" in
+ d)
+ DEBUG="$DEBUG_STR"
+ ;;
+ esac
+done
+
+shift $((OPTIND-1))
+
first_arg="$1"
if [ -z "$1" ]; then