devtools_connect
Attach to a Chrome tab over the DevTools Protocol to start a debugging session. Claims the tab exclusively, marks it in the browser, and reports the loaded state before observation begins.
Instructions
Attach to a Chrome tab over the DevTools Protocol and start observing it (console, network, DOM, debugger). Claims the tab so no other DevCDP session can drive it, marks it visibly in the browser, and reports what was loaded before we attached. Call this once at the start of a debugging session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Chrome host. | localhost |
| port | No | Chrome remote-debugging port. | |
| target | No | 'visible' (the tab on screen) | 'url-match:<substring>' | 'index:<n>' from list_tabs | 'new' | a URL substring. | visible |
| window | No | 'new' gives this session its own browser window — the fallback when Chrome tab groups are unavailable. | current |
| browser | No | 'new' launches a separate isolated Chrome on the next free port — a browser no other session has touched. | existing |
| allow_new_tab | No | If every tab is already claimed by another session, open a new one instead of failing. |