File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -112,3 +112,6 @@ SCALA_ASM=$(find_lib "*scala-asm*")
112
112
SCALA_LIB=$( find_lib " *scala-library*" )
113
113
SCALA_XML=$( find_lib " *scala-xml*" )
114
114
SBT_INTF=$( find_lib " *sbt-interface*" )
115
+
116
+ # debug
117
+ DEBUG_STR=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ case "$1" in
76
76
--) shift ; for arg; do addResidual " $arg " ; done ; set -- ;;
77
77
-h|-help) help=true && shift ;;
78
78
-v|-verbose) verbose=true && shift ;;
79
- -debug) debug=true && shift ;;
79
+ -debug) DEBUG= " $DEBUG_STR " && shift ;;
80
80
-q|-quiet) quiet=true && shift ;;
81
81
82
82
# Optimize for short-running applications, see https://github.com/lampepfl/dotty/issues/222
@@ -103,6 +103,7 @@ classpathArgs
103
103
104
104
eval exec " \" $JAVACMD \" " \
105
105
${JAVA_OPTS:- $default_java_opts } \
106
+ " $DEBUG " \
106
107
" ${java_args[@]} " \
107
108
" $jvm_cp_args " \
108
109
-Dscala.usejavacp=true \
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ source "$PROG_HOME/bin/common"
31
31
32
32
CLASS_PATH=" .$PSEP$DOTTY_LIB$PSEP$SCALA_LIB "
33
33
34
+ # -d must be the first option
35
+ case " $1 " in
36
+ -d) DEBUG=" $DEBUG_STR " && shift ;;
37
+ esac
38
+
34
39
first_arg=" $1 "
35
40
36
41
if [ -z " $1 " ]; then
@@ -39,5 +44,5 @@ if [ -z "$1" ]; then
39
44
elif [[ ${first_arg: 0: 1} == " -" ]]; then
40
45
eval " $PROG_HOME /bin/dotc -repl $@ "
41
46
else
42
- eval exec " \" $JAVACMD \" " " -classpath \" $CLASS_PATH \" " $@
47
+ eval exec " \" $JAVACMD \" " " $DEBUG " " -classpath \" $CLASS_PATH \" " $@
43
48
fi
You can’t perform that action at this time.
0 commit comments