private static @NotNull ServerSocket createServerSocketForDebugging(@NotNull TargetEnvironment environment,
                                                                        @NotNull TargetEnvironment.LocalPortBinding ideServerPortBinding)
      throws IOException {
      ResolvedPortBinding localPortBinding = environment.getLocalPortBindings().get(ideServerPortBinding);
      int port = ideServerPortBinding.getLocal();
      InetAddress hostInetAddress;
      if (localPortBinding != null) {
        hostInetAddress = InetAddress.getByName(localPortBinding.getLocalEndpoint().getHost());
      }
      else {
        LOG.error("The resolution of the local port binding for \"" + port + "\" port cannot be found in the prepared environment" +
                  ", falling back to \"localhost\" for the server socket binding on the local machine");
        hostInetAddress = InetAddress.getLoopbackAddress();
      }
      LOG.debug("Creating server socket for debugging at " + hostInetAddress + ":" + port);
      return new ServerSocket(port, 0, hostInetAddress);
    }
private static @NotNull ServerSocket createServerSocketForDebugging(@NotNull TargetEnvironment environment,
                                                                        @NotNull TargetEnvironment.LocalPortBinding ideServerPortBinding)