index.js
function buildWebSocketUrl(inspectorHost, inspectorPort, debugPort, isSecure) {
  var parts = {
    protocol: isSecure ? 'wss:' : 'ws:',
    hostname: inspectorHost == '0.0.0.0' ? '127.0.0.1' : inspectorHost,
    port: inspectorPort,
    pathname: '/',
    search: '?port=' + debugPort,
    slashes: true
  };

  return url.format(parts);
}
function buildWebSocketUrl(inspectorHost, inspectorPort, debugPort, isSecure) {
  var parts = {
    protocol: isSecure ? 'wss:' : 'ws:',
    hostname: inspectorHost == '0.0.0.0' ? '127.0.0.1' : inspectorHost,
    port: inspectorPort,
    pathname: '/',
    search: '?port=' + debugPort,
    slashes: true
  };

  return url.format(parts);
}
function buildWebSocketUrl ( inspectorHost , inspectorPort , debugPort , isSecure ) { var parts = { protocol : isSecure ? 'wss:' : 'ws:' , hostname : inspectorHost == '0.0.0.0' ? '127.0.0.1' : inspectorHost , port : inspectorPort , pathname : '/' , search : '?port=' + debugPort , slashes : true } ; return url . format ( parts ) ; }
Build a URL for the WebSocket endpoint.
@param {string|undefined} inspectorHost as configured via --web-host
@param {number} inspectorPort as configured via --web-port
@param {number} debugPort as configured via --debug in the debugged app
@param {number} isHttps as configured via --ssl-cert and --ssl-key in the debugged app
Build a URL for the WebSocket endpoint .