Skip to content

Commit 26a7552

Browse files
committed
Add internal dev launcher option: -debug-subprocess-java
1 parent 154eed9 commit 26a7552

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@ protected List<String> preprocessArguments(List<String> givenArgs, Map<String, S
199199
inputArgs.remove("-debug-java");
200200
}
201201
continue;
202+
case "-debug-subprocess-java-port":
203+
case "-debug-subprocess-java":
204+
int subprocessDebuggerPort = 8000;
205+
if (arg.equals("-debug-subprocess-java-port")) {
206+
subprocessDebuggerPort = Integer.parseInt(argumentIterator.next());
207+
}
208+
addRelaunchArg("-debug-subprocess-java-port");
209+
addRelaunchArg(Integer.toString(subprocessDebuggerPort + 1));
210+
addRelaunchArg("--vm.agentlib:jdwp=transport=dt_socket,server=y,address=" + subprocessDebuggerPort + ",suspend=y");
211+
continue;
202212
case "-debug-perf":
203213
unrecognized.add("--engine.TraceCompilation");
204214
unrecognized.add("--engine.TraceCompilationDetails");

0 commit comments

Comments
 (0)