private static int getRemoteDebugPort() {
    int result = Registry.intValue("ide.browser.jcef.debug.port", -1);
    if (result >= 0) {
      return result;
    }

    if (Registry.is("ide.browser.jcef.debug.port.random.enabled", false)) {
      return 0;
    }

    return -1;
  }
private static int getRemoteDebugPort()