private void reattach(DebugEnvironment environment, Runnable detachVm, Runnable vmReadyCallback) {
    reattach(environment.getRemoteConnection(), detachVm, () -> {
      createVirtualMachine(environment);
      vmReadyCallback.run();
    });
  }
private void reattach(DebugEnvironment environment, Runnable detachVm, Runnable vmReadyCallback)