JetBrains/intellij-community · error · ExecutionException

"{0}" action is now supported for execution on the local mac

Error message

"{0}" action is now supported for execution on the local machine only

What it means

DefaultJavaProgramRunner.doExecuteAsync checks whether the run profile needs a remote target environment (needPrepareTarget()). If the run must execute on a non-local target (WSL, Docker, SSH remote, Cloud) and the chosen executor is not supported there (isExecutorSupportedOnTarget fails), it throws ExecutionException stating the action (e.g. Debug, Coverage, Profile) only works locally.

Source

Thrown at java/execution/impl/src/com/intellij/execution/impl/DefaultJavaProgramRunner.java:179

    throws ExecutionException {
    final JavaParameters parameters = state.getJavaParameters();
    patch(parameters, env.getRunnerSettings(), env.getRunProfile(), true);

    if (Registry.is("execution.java.always.debug") && DebuggerSettings.getInstance().ALWAYS_DEBUG) {
      ParametersList parametersList = parameters.getVMParametersList();
      if (!ContainerUtil.exists(parametersList.getList(), s -> s.startsWith("-agentlib:jdwp"))) {
        parametersList.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,quiet=y");
      } 
    }
  }

  protected @NotNull Promise<@Nullable RunContentDescriptor> doExecuteAsync(@NotNull TargetEnvironmentAwareRunProfileState state,
                                                                            @NotNull ExecutionEnvironment env)
    throws ExecutionException {
    FileDocumentManager.getInstance().saveAllDocuments();
    boolean isLocal = !((TargetEnvironmentAwareRunProfile)env.getRunProfile()).needPrepareTarget();
    if (!isLocal && !isExecutorSupportedOnTarget(env)) {
      throw new ExecutionException(
        ExecutionBundle.message("run.configuration.action.is.supported.for.local.machine.only", env.getExecutor().getActionName())
      );
    }

    return state.prepareTargetToCommandExecution(env, LOG,"Failed to execute java run configuration async", () -> {
      @Nullable ProcessProxy proxy = null;
      if (state instanceof JavaCommandLine) {
        patchJavaCommandLineParams((JavaCommandLine)state, env);
        if (isLocal) {
          proxy = ProcessProxyFactory.getInstance().createCommandLineProxy((JavaCommandLine)state);
        }
      }

      return executeJavaState(state, env, proxy);
    });
  }

  /**

View on GitHub (pinned to be881553f2)

Solutions

  1. Switch the run target back to 'Local' in the run configuration editor, then re-run the action
  2. Or use an executor that supports remote targets (plain Run) for remote executions
  3. For remote debugging, instead attach a 'Remote JVM Debug' configuration to the process's debug port rather than launching Debug on the target
  4. Update IntelliJ — newer versions progressively support more executors on targets (e.g. WSL debug)
Defensive patterns

Strategy: validation

Validate before calling

// before executing with a special executor, check target support
RunProfile profile = env.getRunProfile();
boolean remote = profile instanceof TargetEnvironmentAwareRunProfile t && t.needPrepareTarget();
if (remote && !isExecutorSupportedOnTarget(env)) {
  return notifyLocalOnly(env.getExecutor().getActionName());
}

Try / catch

try {
  runner.doExecuteAsync(state, env);
} catch (ExecutionException e) {
  // executor unsupported on the selected run target: suggest switching target to Local
  suggestLocalTarget(e);
}

Prevention

When it happens

Trigger: Run/Debug a Java run configuration with a target environment (Docker/WSL/SSH run target) selected, using an executor that the Java program runner has not whitelisted for remote execution.

Common situations: User switches the run target to Docker or a remote SSH machine, then clicks Debug or Coverage; debug-in-docker is only supported through specific configurations, and coverage/profiling of remote processes is unsupported.

Related errors


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/91463b9eeb52b585. Report an issue: GitHub.