`list_console_messages` misses messages logged before the server attached
Maintainers usually reply within 1 day
@yiaany is already working on this.
Since Aug 28, 2026.
- #2383 by @thomasbachem — closed without merging
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- devtools
Research direction
Start at the list_console_messages implementation and trace how page.on('console') is subscribed during connection. Reproduce with --browserUrl, then use page.createCDPSession() and Runtime.enable to compare buffered replay with live collection; done means pre-attach messages appear without duplicates while new messages continue to appear.
Written by the indexing model from the issue text.
Description
Description of the bug
list_console_messages only reports messages emitted after the server attached. Attach to an already-loaded page (e.g. --browserUrl against a browser that's been running a while) and it returns <no console messages found> even though the page logged plenty during load – all sitting right there in a DevTools window.
It's a quiet failure – an empty listing reads as "the page logged nothing", and it cost me a bogus diagnosis before I spotted it.
The messages aren't lost. Chromium buffers them and replays them via Runtime.consoleAPICalled to every new CDP session that calls Runtime.enable. Puppeteer calls Runtime.enable itself during connect(), so the replay is emitted on the page before any consumer can subscribe – page.on('console') never sees it.
PR: #2383.
Reproduction
- Start Chrome with
--remote-debugging-port, and have a page log something (console.log('PRE-ATTACH')) - Start chrome-devtools-mcp with
--browserUrlagainst it list_console_messages-><no console messages found>- Log something new -> only that one shows up
A fresh raw CDP session on the same page replays what step 3 missed, so the buffer is intact. It's also reachable from the server's own page object:
const session = await page.createCDPSession();
session.on('Runtime.consoleAPICalled', ...);
await session.send('Runtime.enable'); // replays the whole buffer
That recovered every buffered message in my test, and page.on('console') kept working afterwards.
Expectation
list_console_messages includes what the page logged before the server attached – or failing that, says the listing only starts at attach, so an empty result isn't mistaken for a clean page.
A backfill would double up on anything the live collector already holds, so it presumably wants dedup, or to run before the collector subscribes. Happy to send a PR if you have a preference on which.
Chrome DevTools MCP version
1.6.0 (on main too)
- Dominant language
- TypeScript
- Stars
- 59.8k
- Forks
- 4.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 162
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ChromeDevTools/chrome-devtools-mcp
-
feature
Difficulty 1/5 Under an hour Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#3689 ·
Maintainers usually reply within 1 day
-
`evaluate_script` `sourcePath` http(s) URLs are mangled into `file://` pathsMay be free again A pull request for this issue was closed without being merged. Opencollecting-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#3453 · 3 comments ·
Maintainers usually reply within 1 day
-
collecting-feedback feature
Difficulty 2/5 Half a day Newbie friendliness 76/100
ChromeDevTools/chrome-devtools-mcp#3225 · 3 comments ·
Maintainers usually reply within 1 day
-
confirmed p3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#2947 · 1 comment ·
Maintainers usually reply within 1 day
-
Project Migration: Moving to devtools-frontendPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
ChromeDevTools/chrome-devtools-mcp#3648 ·
Maintainers usually reply within 1 day
All issues in ChromeDevTools/chrome-devtools-mcp
Similar issues
-
bug from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nightly-labs/openbot#21303 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ADORSYS-GIS/CoopData#282 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OHDSI/Data2Evidence#3816 ·
Maintainers usually reply within 3 days
-
`ovsx verify` fails for a version older than the 100 newest of an extensionPossibly taken @trivikr claimed this today. Opencli
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
eclipse-openvsx/openvsx#2482 · 2 comments ·
Maintainers usually reply within 1 day
-
bug builder-vite hmr sev:S3
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
storybookjs/storybook#37965 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day