Repository navigation
feat(chromium): attach to a running browser with a remote-debugging:// or extension:// URL - #44247
Merged
Pavel Feldman (pavelfeldman) merged 1 commit intoNov 20, 2026
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…/ or extension:// URL
- `connectOverCDP('extension://chrome/Profile 1')` starts the CDP relay in the
server and connects to the tabs that the user shares through the Playwright
Extension in that profile. The other options of the connection are
`x-playwright-extension-*` headers.
- `connectOverCDP('remote-debugging://msedge?userDataDir=...')` connects to a
browser with remote debugging enabled.
- The MCP server (`--cdp-endpoint`) and the CLI (`attach --cdp`) take the same
URLs, and `list --all` prints the URL of each browser and profile.
Pavel Feldman (pavelfeldman)
force-pushed
the
extension-url
branch
from
November 20, 2026 16:23
b2dd432 to
8cb7cb1
Compare
Contributor
Test results for "MCP"5250 passed, 644 skipped Merge workflow run. |
Contributor
Test results for "tests 1"Warning The triggering workflow run ended with status 1 flaky23604 passed, 708 skipped Merge workflow run. |
Yury Semikhatsky (yury-s)
approved these changes
Nov 20, 2026
| lines.push(` - profile-dir: ${path.join(session.userDataDir, profile.dirName)}`); | ||
| if (profile.extensionInstalled) | ||
| lines.push(` - attach (extension): \`playwright-cli attach --extension=${session.channel} --profile-dir-name="${profile.dirName}"\``); | ||
| lines.push(` - attach (extension): \`playwright-cli attach --cdp="extension://${session.channel}/${profile.dirName}"\``); |
There was a problem hiding this comment.
attach --cdp="extension:// - why not just attach <url> ?
Pavel Feldman (pavelfeldman)
merged commit Nov 20, 2026
99d4c41
into
microsoft:main
25 of 26 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
connectOverCDP('extension://chrome/Profile 1')starts the CDP relay in the server and connects to the tabs that the user shares through the Playwright Extension in that profile. The other options of the connection arex-playwright-extension-*headers.connectOverCDP('remote-debugging://msedge?userDataDir=...')connects to a browser with remote debugging enabled. A bare channel name such aschromestill works.--cdp-endpoint) and the CLI (attach --cdp) take the same URLs, andlist --allprints the URL of each browser and profile.