### Preflight Checklist

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * v10.1.2
* **Operating System:**
  * Windows 10 (1809)
* **Last Known Working Electron version:**
  * 5.0.1  (have not tested others)

### Expected Behavior
From a console, start electron with a remote-debugging-port.  E.g. 

```
$ electron --remote-debugging-port=9092
```

Now navigate to localhost:9092. We would expect to see devtools remotely attached.

### Actual Behavior
A scrambled mess appears. (output is shortened below)
```��Tmo�0��.......```

### To Reproduce
```
$ electron --remote-debugging-port=9092
```

### Additional Information
If you navigate to `http://localhost:9092/json/list`, and then scrape the URL out of `devtoolsFrontendUrl`, you can access them that way. Although this works, it is somewhat of a chore.

shell/browser/ui/devtools_manager_delegate.cc
base::FilePath user_dir;
  base::PathService::Get(DIR_USER_DATA, &user_dir);
  content::DevToolsAgentHost::StartRemoteDebuggingServer(
      CreateSocketFactory(), user_dir, base::FilePath());
}
DevToolsManagerDelegate::DevToolsManagerDelegate() = default;
DevToolsManagerDelegate::~DevToolsManagerDelegate() = default;
void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {}
void DevToolsManagerDelegate::HandleCommand(
    content::DevToolsAgentHostClientChannel* channel,
    base::span<const uint8_t> message,
    NotHandledCallback callback) {
  crdtp::Dispatchable dispatchable(crdtp::SpanFrom(message));
  DCHECK(dispatchable.ok());
  if (crdtp::SpanEquals(crdtp::SpanFrom(kBrowserCloseMethod),
                        dispatchable.Method())) {
    
    
    
    
    
    
    base::PostTask(FROM_HERE, {content::BrowserThread::UI},
                   base::BindOnce([]() { Browser::Get()->Quit(); }));
    return;
  }
  std::move(callback).Run(message);
}
scoped_refptr<content::DevToolsAgentHost>