[FEATURE]: Add DevTools for built-in Desktop browser tabs
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 38/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- electron, javascript, typescript
- Domaine
- desktop-dev, devtools
Piste de recherche
Start with the built-in Desktop browser tab creation and the menu/action registration that currently targets the application shell. Inspect the Browser API observation path and its Electron debugger-detach handling, then run the packaged Desktop app on Windows to reproduce the tab-scoped DevTools workflow. Done means DevTools opens for only the selected tab, preserves its state, and the agent reports busy during manual ownership but recovers after DevTools closes; treat the Browser API follow-ups as separate work.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Add an Open DevTools action for the active tab in the built-in Desktop browser. This would let me debug the page I am already working on with the agent, preserving its session and in-memory state without reopening it in an external browser or enabling a remote debugging port.
Current behavior (Desktop 2.4.2 on Windows): In the packaged code, the browser tab is created with native DevTools disabled, and View → Toggle Developer Tools targets the application shell. The Browser API already provides page evaluation, console messages, HTTP request inspection, tracing, CPU and heap profiling, and Lighthouse. Related browser-pane work: #63002.
Initial scope: DevTools for a browser tab
Open Chromium's DevTools for the tab selected when the action is invoked. Expose the standard panels available for Electron web content: Elements, Console, Sources, Network, Application, Performance, and Memory, along with Device Mode where supported. The key workflow is stepping through JavaScript in Sources. Keep the same document and page state when opening and closing DevTools.
Electron documents that opening DevTools can detach the existing programmatic debugger. The current browser pane treats an unexpected detach as a page failure. This is an integration risk identified from the packaged code and Electron's documentation, not a failure reproduced with per-tab DevTools enabled. If manual DevTools temporarily takes ownership, agent operations on that tab should report that it is busy, and agent control and diagnostics should recover when DevTools closes.
Acceptance example: Open two pages. On tab A, change an in-memory value, then open DevTools while the agent is already observing the tab. Hit a breakpoint in a test script with a valid TypeScript source map, step, resume, and close DevTools. The value is unchanged and new console and network events from tab A are visible through the Browser API. Tab B is not paused or taken over. Also verify that closing DevTools while tab A is paused does not leave that tab stuck.
Browser API follow-ups
The UI request above can ship independently. The list below tracks additional work for the agent. Where Desktop already has a capability, expose it rather than reimplementing it. Scope agent-controlled breakpoints, emulation, and request overrides to the targeted tab. Support explicit reset and release agent-owned settings when debugging ends or the tab closes.
- JavaScript debugger: set, disable, and remove line breakpoints, conditional breakpoints, and logpoints in plain JavaScript and source-mapped builds. Support pause, step in/over/out, and resume. Inspect sync and async call stacks and local scopes, and evaluate expressions in a paused frame. Include exception, DOM, event-listener and XHR/fetch breakpoints, and worker targets where supported.
- Startup and network control: expose registration and removal of an agent-supplied script that runs before page scripts; Desktop already uses pre-document scripts internally. Add tab-scoped request blocking and request/response overrides for tests (request headers and body; response status, headers, and body), and cache bypass across requests beyond the existing one-off
reload(ignoreCache). - Emulation: expose existing fixed viewport and mobile/touch presets. Add independent controls for device pixel ratio, custom user agent, locale/timezone, geolocation, media preferences, offline and network latency/bandwidth, and CPU throttling.
- Network diagnostics: expose redirect chains already tracked internally, request initiator stacks and timing phases, individual WebSocket messages and SSE events, optional capture across navigation, and HAR export that redacts credential headers and omits URL query strings and payloads by default.
- Application and security diagnostics: cookie inspection and selective cookie clearing are already requested in #63519, which also proposes a basic storage reset. Track the remaining gaps here: blocked-cookie reasons, service-worker inspection and bypass, HTTP-cache behavior, and browser-reported TLS/certificate, mixed-content, CORS and content-policy issues. If existing Desktop site-data/cache clearing is exposed to the agent, show the affected origin or profile and confirm the action. Other tabs can share that data.
- CSS, rendering and coverage: expose matched and overridden rules with source locations, forced pseudo-states, native paint/layout-shift overlays and compositor layers, and used/unused ranges for JS and CSS.
- User-flow recording: record actions a person performs in the tab and export replayable steps.
API acceptance examples:
- On a test page, the agent sets a breakpoint, receives a pause event, reads a known local variable, steps, and resumes. Ending the agent's debugging session while paused releases a pause it owns and preserves user breakpoints.
- Start with the same test endpoint returning
200in two tabs on the same origin. Install a mock before reloading tab A. Make a fresh request from each tab while the mock is active. Tab A receives503; tab B receives200. Remove the mock and verify a new request from tab A receives200.
- Langage dominant
- TypeScript
- Étoiles
- 230k
- Forks
- 31.3k
- Merge moyen
- 5 h 32 min
- PR mergées (30 j)
- 453
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
anomalyco/opencode#67064 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 Une demi-journée Accessibilité débutants 82/100
anomalyco/opencode#67009 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
area/web type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
anomalyco/opencode#67001 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logPeut-être pris @liwenjie200543 l’a pris il y a 2 jours. Ouvertearea/plugins platform/linux reproduced type/bug version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
anomalyco/opencode#66970 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksPeut-être pris @argszero l’a pris il y a 2 jours. Ouvertearea/tui platform/wsl status/repro-simulated type/bug version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
anomalyco/opencode#66773 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de anomalyco/opencode
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
ci
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ClickHouse/clickhouse-js#1248 ·
Les mainteneurs répondent en général sous 1 jour
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltOuvertetechnik
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
AhmedNAgy25/analysor#25 ·
Les mainteneurs répondent en général sous 1 jour