@Nullable
  private static RunContentDescriptor createProcessToDebug(
    ExternalSystemRunnableState state,
    @NotNull ExecutionEnvironment env
  ) throws ExecutionException {

    RunContentDescriptor result;

    try {
      result = XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
        @Override
        @NotNull
        public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
          return jvmProcessToDebug(session, state, env);
        }
      }).getRunContentDescriptor();
    }
    catch (ExecutionException e) {
      if (!e.getMessage().equals(ATTACH_VM_FAILED)) {
        throw e;
      }
      result = null;
    }

    return result;
  }
@Nullable
  private static RunContentDescriptor createProcessToDebug(
    ExternalSystemRunnableState state,
    @NotNull ExecutionEnvironment env
  )