void (@NotNull RunConfigurationBase<?> configuration, @NotNull ProcessHandler handler, @Nullable RunnerSettings runnerSettings) { if (Registry.is("debugger.auto.attach.from.console")) { handler.addProcessListener(new ProcessAdapter() { @Override public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) { Matcher matcher = JavaDebuggerConsoleFilterProvider.getConnectionMatcher(event.getText()); if (matcher != null) { String transport = matcher.group(1); String address = matcher.group(2); Project project = configuration.getProject(); JavaAttachDebuggerProvider.attach(transport, address, null, project); } } }); } }