return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() { @NotNull @Override
((BallerinaApplicationRunningState) state).setDebugPort(port); return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() { ((BallerinaTestRunningState) state).setDebugPort(port); return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() { } else if (state instanceof BallerinaRemoteRunningState) { FileDocumentManager.getInstance().saveAllDocuments(); return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
@Nullable @Override protected MyRunProfile getRunProfile(@NotNull final ExecutionEnvironment environment) { final Project project = environment.getProject(); return project != null? getRunProfile(project) : null; }
protected String getPrgName() { return getEnvironment().getProject().getName() + ".prg"; }
public PerlRemoteDebuggingRunProfileState(ExecutionEnvironment environment) { super(environment); PerlRemoteDebuggingConfiguration debuggingConfiguration = (PerlRemoteDebuggingConfiguration)environment.getRunProfile(); Project project = environment.getProject(); String projectPath = project.getBaseDir().getCanonicalPath(); myLocalProjectPath = new File(projectPath == null ? "" : projectPath); myRemoteProjectPath = new File(debuggingConfiguration.getRemoteProjectRoot()); }
@Nullable @Override protected ConsoleView createConsole(@NotNull Executor executor) throws ExecutionException { RunProfile runProfile = getEnvironment().getRunProfile(); PerlHostData hostData = null; if (runProfile instanceof PerlRunConfiguration) { hostData = PerlHostData.from(((PerlRunConfiguration)runProfile).getEffectiveSdk()); } return new PerlRunConsole(getEnvironment().getProject(), hostData); }
@Override protected RunContentDescriptor doExecute( @NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException { ensureSingleDebugSession(env.getProject()); CloudDebugProcessState cloudState = null; if (state instanceof CloudDebugProcessState) { cloudState = (CloudDebugProcessState) state; } FileDocumentManager.getInstance().saveAllDocuments(); state.execute(env.getExecutor(), this); return createContentDescriptor(cloudState, env); }
@Override protected RunContentDescriptor doExecute(@NotNull final RunProfileState state, @NotNull final ExecutionEnvironment env) throws ExecutionException { FileDocumentManager.getInstance().saveAllDocuments(); XDebugSession xDebugSession = XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() { @NotNull @Override public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException { return new PerlDebugProcess(session, (PerlDebugProfileStateBase)state, state.execute(env.getExecutor(), PerlDebuggerProgramRunner.this)); } }); return xDebugSession.getRunContentDescriptor(); } }
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { String workingDir = BashRunConfigUtil.findWorkingDir(runConfig); GeneralCommandLine cmd = BashRunConfigUtil.createCommandLine(workingDir, runConfig); if (!cmd.getEnvironment().containsKey("TERM")) { cmd.getEnvironment().put("TERM", "xterm-256color"); } OSProcessHandler processHandler = new KillableColoredProcessHandler(cmd); ProcessTerminatedListener.attach(processHandler, getEnvironment().getProject()); //fixme handle path macros return processHandler; } }
@Nullable @Override protected RunContentDescriptor doExecute(RunProfileState state, ExecutionEnvironment env) throws ExecutionException { if (env.getExecutor().getActionName().equals(DefaultDebugExecutor.EXECUTOR_ID)) { Project project = env.getProject(); String executableFilePath = project.getBasePath().concat("/").concat(project.getName()); final DubConfigurationParser dubParser = new DubConfigurationParser(project, ToolKey.DUB_KEY.getPath(), false); if (dubParser.canUseDub() && dubParser.getDubProject().isPresent()) { final DubProject dubProject = dubParser.getDubProject().get(); final DubPackage dubPackage = dubProject.getRootPackage(); executableFilePath = Paths.get( dubPackage.getPath(), dubPackage.getTargetPath(), dubPackage.getTargetFileName()).toString().replace("\\", "/"); } Executor executor = env.getExecutor(); return RunUtil.startDebugger(this, state, env, project, executor, executableFilePath); } return super.doExecute(state, env); }
@Nullable @Override protected RunContentDescriptor doExecute(RunProfileState state, ExecutionEnvironment env) throws ExecutionException { if (env.getExecutor().getActionName().equals(DefaultDebugExecutor.EXECUTOR_ID)) { Project project = env.getProject(); Executor executor = env.getExecutor(); Logger logger = Logger.getInstance(this.getClass()); try { return RunUtil.startDebugger(this, state, env, project, executor, ((DlangRunAppState) state).getExecutableCommandLine(((DlangRunAppState) state).getConfig()).getExePath());//todo this is yucky } catch (ModuleNotFoundException e) { e.printStackTrace(); logger.error(e.toString()); } catch (NoValidDlangSdkFound NoValidDlangSdkFound) { NoValidDlangSdkFound.printStackTrace(); logger.error(NoValidDlangSdkFound.toString()); } } return super.doExecute(state, env); } }
XDebuggerManager.getInstance(environment.getProject()) .startSession( environment,
@Nullable @Override public ExecutionResult execute(final Executor executor, @NotNull final ProgramRunner programRunner) throws ExecutionException { final Project project = environment.getProject(); if (project == null) {
Project project = getEnvironment().getProject();