code: function connectToURL(url) {
          if (_connectDeferred) {
              // reject an existing connection attempt
              _connectDeferred.reject("CANCEL");
          }
          var deferred = new $.Deferred();
          _connectDeferred = deferred;
          var promise = getDebuggableWindows();
          promise.done(function onGetAvailableSockets(response) {
              var i, page;
              for (i in response) {
                  page = response[i];
                  if (page.webSocketDebuggerUrl && page.url.indexOf(url) === 0) {
                      connect(page.webSocketDebuggerUrl);
                      // _connectDeferred may be resolved by onConnect or rejected by onError
                      return;
                  }
              }
              deferred.reject(FileError.ERR_NOT_FOUND); // Reject with a "not found" error
          });
          promise.fail(function onFail(err) {
              deferred.reject(err);
          });
          return deferred.promise();
      }
docs: Connect to the remote debugger of the page that is at the given URL
  @param {string} url