void (final DebugEnvironment environment, boolean keepCurrentVM, Runnable vmReadyCallback) { reattach(environment, () -> { if (keepCurrentVM) { detachProcess(false, true, vmData -> { myStashedVirtualMachines.addFirst(vmData); myDebuggerManagerThread = new DebuggerManagerThreadImpl(myDisposable, myProject); }); } else { closeProcess(false); } }, vmReadyCallback); }