Skip to content

browser: support attach with approval-based remote debugging - #2436

Merged
Connor Peet (connor4312) merged 1 commit into
mainfrom
connor4312/approval-remote-debugging
Oct 13, 2026
Merged

Connor Peet (connor4312) merged 1 commit into
mainfrom
connor4312/approval-remote-debugging

Conversation

@connor4312

Copy link
Copy Markdown
Member

Chrome and Edge can turn on remote debugging from chrome://inspect/#remote-debugging or
edge://inspect/#remote-debugging. This server does not support HTTP discovery, and each
WebSocket connection shows an approval prompt in the browser. Now, browser attach supports
this mode.

  • Find the browser endpoint from the DevToolsActivePort file. Use the new optional
    userDataDir attach option, or else the default user data directories of Chrome,
    Chromium, and Edge.
  • Do the HTTP discovery attach and the DevToolsActivePort attach in parallel. Use the first
    connection that succeeds, and stop the other attach. If the two attaches fail, show the
    HTTP discovery error.
  • Make one WebSocket connection with no timeout while the user approves, so that the browser
    does not show more than one prompt. Add WebSocketTransport.open for one attempt.
  • Show a cancellable DAP progress while the browser waits for approval. If the user cancels
    it, stop the full launch and end the debug session.
  • Add the userDataDir attach option to the schema, documentation, and changelog.

Fixes #2435

(Commit message generated by Copilot)

Chrome and Edge can turn on remote debugging from chrome://inspect/#remote-debugging or
edge://inspect/#remote-debugging. This server does not support HTTP discovery, and each
WebSocket connection shows an approval prompt in the browser. Now, browser attach supports
this mode.

- Find the browser endpoint from the DevToolsActivePort file. Use the new optional
  `userDataDir` attach option, or else the default user data directories of Chrome,
  Chromium, and Edge.
- Do the HTTP discovery attach and the DevToolsActivePort attach in parallel. Use the first
  connection that succeeds, and stop the other attach. If the two attaches fail, show the
  HTTP discovery error.
- Make one WebSocket connection with no timeout while the user approves, so that the browser
  does not show more than one prompt. Add `WebSocketTransport.open` for one attempt.
- Show a cancellable DAP progress while the browser waits for approval. If the user cancels
  it, stop the full launch and end the debug session.
- Add the `userDataDir` attach option to the schema, documentation, and changelog.

Fixes #2435

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) October 13, 2026 22:12
Comment thread src/cdp/webSocketTransport.ts Dismissed
@connor4312
Connor Peet (connor4312) merged commit 49b9128 into main Oct 13, 2026
15 of 16 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/approval-remote-debugging branch October 13, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Chrome approval-based remote debugging (HTTP discovery 404 and consent handshake timeout)

3 participants