Skip to content

Commit 9a5d2fc

Browse files
authored
Support to use a launcher to run in terminal (microsoft#288)
1 parent 08127a0 commit 9a5d2fc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ protected void handleTerminatedEvent(IDebugAdapterContext context) {
184184
*/
185185
public static String[] constructLaunchCommands(LaunchArguments launchArguments, boolean serverMode, String address) {
186186
String slash = System.getProperty("file.separator");
187-
188187
List<String> launchCmds = new ArrayList<>();
188+
if (launchArguments.launcherScript != null) {
189+
launchCmds.add(launchArguments.launcherScript);
190+
}
189191
final String javaHome = StringUtils.isNotEmpty(DebugSettings.getCurrent().javaHome) ? DebugSettings.getCurrent().javaHome
190192
: System.getProperty("java.home");
191193
launchCmds.add(javaHome + slash + "bin" + slash + "java");

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/protocol/Requests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public static class LaunchArguments extends LaunchBaseArguments {
8282
public Map<String, String> env;
8383
public boolean stopOnEntry;
8484
public boolean noDebug = false;
85-
public CONSOLE console = CONSOLE.internalConsole;
85+
public CONSOLE console = CONSOLE.integratedTerminal;
8686
public ShortenApproach shortenCommandLine = ShortenApproach.NONE;
87+
public String launcherScript;
8788
}
8889

8990
public static class AttachArguments extends LaunchBaseArguments {

0 commit comments

Comments
 (0)