use of org.elixir_lang.mix.runner.exunit.MixExUnitRunConfiguration in project intellij-elixir by KronicDeth.
the class ElixirXDebugProcess method runDebugTarget.
@NotNull
private OSProcessHandler runDebugTarget() throws ExecutionException {
OSProcessHandler elixirProcessHandler;
LOG.debug("Preparing to run debug target.");
ArrayList<String> elixirParams = new ArrayList<>();
elixirParams.addAll(myRunningState.setupElixirParams());
elixirParams.addAll(setUpElixirDebuggerCodePath());
List<String> mixParams = new ArrayList<>();
mixParams.addAll(Arrays.asList("intellij_elixir.debug_task", "--debugger-port", "" + myDebuggerNode.getLocalDebuggerPort(), "--"));
List<String> mixCommandArgs = getRunConfiguration().getMixArgs();
mixParams.addAll(mixCommandArgs);
if (getRunConfiguration() instanceof MixExUnitRunConfiguration && !mixCommandArgs.contains("--trace")) {
// Prevents tests from timing out while debugging
mixParams.add("--trace");
}
GeneralCommandLine commandLine = MixRunningStateUtil.commandLine(getRunConfiguration(), elixirParams, mixParams);
LOG.debug("Running debugger process. Command line (platform-independent): ");
LOG.debug(commandLine.getCommandLineString());
Process process = commandLine.createProcess();
elixirProcessHandler = new OSProcessHandler(process, commandLine.getCommandLineString());
LOG.debug("Debugger process started.");
return elixirProcessHandler;
}
Aggregations