feat: add browser extension context debugging support#714
feat: add browser extension context debugging support#714Tasktivity wants to merge 3 commits intoChromeDevTools:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
314d2df to
92ab6b3
Compare
Add --enableExtensions flag to enable debugging of Chrome extension contexts. New capabilities: - Extension pages (sidepanels, popups, options pages) visible in list_pages - Service workers listed in dedicated section - New open_extension_sidepanel tool to open sidepanel in detached window - Full debugging support: snapshots, console, script evaluation Due to Chrome security requirements, chrome.sidePanel.open() requires a user gesture and cannot be triggered via CDP. The open_extension_sidepanel tool uses chrome.windows.create() as the standard workaround, opening the sidepanel in a detached popup window with identical code execution. Partially Addresses ChromeDevTools#96
92ab6b3 to
ed85500
Compare
|
Thanks for the PR but in its current form it does not align with how we plan to engineer it (e.g., re-using and modifying Puppeteer to provide better support for extension objects). We are already working on this feature including the features to support something like open_extension_sidepanel so stay tuned! |
This would be great! |
Summary
Implements browser extension context debugging as requested in #96.
This PR adds the ability for AI coding assistants to inspect, debug, and interact with Chrome extension components including service workers, sidepanels, popups, and extension pages.
New Features
--enableExtensionsflaglist_pagesopen_extension_sidepanelScope
This PR implements extension context debugging as requested in #96:
Not Included (Future Work)
Known Chrome Limitations
The following requested features are not technically feasible due to Chrome security restrictions:
click_extension_icon- Browser toolbar is outside CDP's accessible viewport (puppeteer#2486)click_extension_context_menu- Context menus are browser UI elements, inaccessible via CDPThese are fundamental browser security constraints, not implementation gaps.
Testing
list_pages✓select_pageworks for extension contexts ✓take_snapshotcaptures extension UI ✓click,fill,hoverwork on extension elements ✓evaluate_scriptexecutes in extension context ✓Usage
# Enable extension debugging npx @anthropic-ai/claude-code-mcp chrome-devtools --enableExtensionsPartially Addresses #96