Skip to content

Commit

Permalink
Support to use a launcher to run in terminal (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eskibear authored Aug 9, 2019
1 parent 08127a0 commit 9a5d2fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ protected void handleTerminatedEvent(IDebugAdapterContext context) {
*/
public static String[] constructLaunchCommands(LaunchArguments launchArguments, boolean serverMode, String address) {
String slash = System.getProperty("file.separator");

List<String> launchCmds = new ArrayList<>();
if (launchArguments.launcherScript != null) {
launchCmds.add(launchArguments.launcherScript);
}
final String javaHome = StringUtils.isNotEmpty(DebugSettings.getCurrent().javaHome) ? DebugSettings.getCurrent().javaHome
: System.getProperty("java.home");
launchCmds.add(javaHome + slash + "bin" + slash + "java");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public static class LaunchArguments extends LaunchBaseArguments {
public Map<String, String> env;
public boolean stopOnEntry;
public boolean noDebug = false;
public CONSOLE console = CONSOLE.internalConsole;
public CONSOLE console = CONSOLE.integratedTerminal;
public ShortenApproach shortenCommandLine = ShortenApproach.NONE;
public String launcherScript;
}

public static class AttachArguments extends LaunchBaseArguments {
Expand Down

0 comments on commit 9a5d2fc

Please sign in to comment.