public boolean isDebug() { return DefaultDebugExecutor.EXECUTOR_ID.equals(getEnvironment().getExecutor().getId()); }
/** * Indicates whether the debugging is invoked or not. * * @return {@code true} if debugging is running, {@code false} otherwise. */ private boolean isDebug() { return DefaultDebugExecutor.EXECUTOR_ID.equals(getEnvironment().getExecutor().getId()); }
/** * Indicates whether the debugging is invoked or not. * * @return {@code true} if debugging is running, {@code false} otherwise. */ private boolean isDebug() { return DefaultDebugExecutor.EXECUTOR_ID.equals(getEnvironment().getExecutor().getId()); } }
private ExecutionResult getExecutionResults(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException { // Start debugger. ExecutionResult executionResult = state.execute(env.getExecutor(), new BallerinaDebugger()); if (executionResult == null) { throw new ExecutionException("Cannot run debugger"); } return executionResult; }
@Nullable @Override public RunContentDescriptor execute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException { if (state instanceof GoApplicationRunningState) { FileDocumentManager.getInstance().saveAllDocuments(); ((GoApplicationRunningState)state).setHistoryProcessHandler(myHistoryProcessListener); ((GoApplicationRunningState)state).setOutputFilePath(myOutputFilePath); ((GoApplicationRunningState)state).setCompilationFailed(myCompilationFailed); ExecutionResult executionResult = state.execute(env.getExecutor(), GoBuildingRunner.this); return executionResult != null ? new RunContentBuilder(executionResult, env).showRunContent(env.getContentToReuse()) : null; } return null; } }
@Nullable @Override protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException { assert state instanceof GoTestRunningState; GoTestRunningState runningState = (GoTestRunningState)state; GoTestRunConfiguration runConfiguration = ObjectUtils.tryCast(environment.getRunProfile(), GoTestRunConfiguration.class); if (runConfiguration == null) { return null; } FileDocumentManager.getInstance().saveAllDocuments(); CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration); runningState.setCoverageFilePath(coverageEnabledConfiguration.getCoverageFilePath()); ExecutionResult executionResult = state.execute(environment.getExecutor(), this); if (executionResult == null) { return null; } CoverageHelper.attachToProcess(runConfiguration, executionResult.getProcessHandler(), environment.getRunnerSettings()); return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse()); } }
ExecutionResult executionResult = state.execute(env.getExecutor(), GoBuildingRunner.this); if (executionResult == null) { throw new ExecutionException("Cannot run debugger");
@NotNull @Override public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException { return new PerlDebugProcess(session, (PerlDebugProfileStateBase)state, state.execute(env.getExecutor(), PerlDebuggerProgramRunner.this)); } });
@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); }
@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); } }