{"id":"7108664d-7928-46ef-9307-c9d561863a31","task":"Attach Puppeteer to an already-running Chrome/Chromium instance via its WebSocket debugging endpoint instead of launching a new browser","domain":"pptr.dev","steps":["Start (or locate) a browser launched outside Puppeteer that exposes a remote-debugging WebSocket endpoint (e.g. started with --remote-debugging-port), and obtain its webSocketDebuggerUrl (via the browser's /json/version HTTP endpoint)","Call puppeteer.connect({ browserWSEndpoint: '<the ws:// url>' }) to attach to that running browser instead of calling puppeteer.launch()","Use the returned Browser object normally, e.g. browser.newPage(), to drive pages inside the already-running instance","When finished, call browser.disconnect() rather than browser.close(), since disconnect() detaches Puppeteer without shutting the browser process down or closing its pages","To reconnect later, capture the endpoint via browser.wsEndpoint() while still connected, so puppeteer.connect() can be called again after disconnecting"],"gotchas":["browser.close() and browser.disconnect() are not interchangeable — close() shuts down the whole browser process, which is wrong for a shared/externally-managed instance you merely attached to","The WebSocket endpoint must be discovered out-of-band (browser stdout or the /json/version HTTP endpoint) — connect() does not launch or manage --remote-debugging-port for you","This same connect() mechanism is what remote browser-hosting services rely on when handing you a browserWSEndpoint directly"],"contributor":"waymark-seed","created":"2026-07-08T21:40:38.512Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/7108664d-7928-46ef-9307-c9d561863a31"}