Repository navigation
Description
Description of the bug
list_console_messages includes console.log output from a page's dedicated workers, but not the worker's uncaught exceptions or unhandled promise rejections. A worker that logs a line and then throws shows only the log line; no [error] entry exists for the crash, so an agent cannot see that the worker failed or why. Both tested builds behave the same.
Actual behavior
Both builds (entry order varies between runs):
list_console_messages:
msgid=1 [log] w-throw-before (1 args)
msgid=2 [log] w-reject-before (1 args)
msgid=3 [error] Failed to load resource: the server responded with a status of 404 (File not found) (0 args)
list_console_messages types=["error"]:
msgid=3 [error] Failed to load resource: the server responded with a status of 404 (File not found) (0 args)
worker-uncaught and worker-rejection appear in no response. In the variant fixture, the error text appeared only as the page's own console.log from worker.onerror ([log] page saw worker onerror: Uncaught Error: worker-uncaught-min), not as an error entry from the worker.
Reproduction
- Save these three files in an empty directory and serve it with
python3 -m http.server PORT --bind 127.0.0.1.
workers.html:
<!doctype html>
<title>workers</title>
<script>
new Worker('/w-throw.js');
new Worker('/w-reject.js');
</script>w-throw.js:
console.log('w-throw-before');
throw new Error('worker-uncaught');w-reject.js:
console.log('w-reject-before');
Promise.reject(new Error('worker-rejection'));- Send these
tools/callrequests, waiting about two seconds afternew_page:
{"name":"new_page","arguments":{"url":"http://127.0.0.1:PORT/workers.html"}}
{"name":"list_console_messages","arguments":{"pageId":2}}
{"name":"list_console_messages","arguments":{"pageId":2,"types":["error"]}}The sequence was run once per build. An earlier run of a variant fixture, in which the page also set worker.onerror to log e.message, behaved the same on both builds.
Expectation
list_console_messages is described as "List all console messages for the target page since the last navigation." Worker console output is already in scope, because the worker's console.log lines are listed. Uncaught page exceptions are listed as [error] Uncaught Error: ... entries. A worker's uncaught exception (Uncaught Error: worker-uncaught) and its unhandled rejection should therefore be listed as error entries too, as the Chrome DevTools console shows them.
MCP configuration
--headless --isolated --no-usage-statistics --no-performance-crux unless the reproduction states otherwise (update checks disabled with CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1).
Chrome DevTools MCP version
1.10.1 (npm) and main 5ddb0a3 (local build)
Chrome version
154.0.8037.98 (stable)
Node version
v22.23.2
Operating system
macOS 27.0
Environment details
- chrome-devtools-mcp 1.10.1 from npm (the release build).
- chrome-devtools-mcp built from
mainat commit 5ddb0a3 (themainbuild). - Google Chrome 154.0.8037.98 stable, headless; Node v22.23.2; macOS 27.
- Both builds were started with
--headless --isolated --no-usage-statistics --no-performance-cruxandCHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1, and driven by a scripted stdio MCP client. In a fresh isolated session the page opened bynew_pagehas page ID 2.
Evidence
- Expected source:
list_console_messagestool description (src/tools/console.ts); the listed workerconsole.loglines and the page'sUncaught Error: ...entries in the same tool's output. - Failure source: scripted MCP runs above on both builds.
PageCollector.subscribe()listens forRuntime.exceptionThrownon the page's own CDP session (src/collectors/PageCollector.ts:269on themainbuild); no equivalent listener on the worker targets was found. - Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Fix check
With the fixture above, list_console_messages (with and without types: ["error"]) contains an error entry whose text includes worker-uncaught and an error entry whose text includes worker-rejection, and the w-throw-before and w-reject-before log entries are still listed. Control: after navigating the page elsewhere, the worker entries are no longer listed, like other messages from the previous navigation.
Additional context
The full open and closed issue and PR corpus was screened as of 2026-10-06. #316 asks for script evaluation inside dedicated workers, which is a different capability. #2846 and PR #2881 concern service-worker console filtering by serviceWorkerId. No issue covers dedicated-worker exceptions.
Activity
OrKoN commentedon Oct 12, 2026
cc @nroscino
nroscino commentedon Oct 13, 2026
@OrKoN I can work on this once I clear all the higher priorities. I have already a proposal ready that touches this part on the puppeteer side.
fix: dedicated worker can now build a stack trace (ChromeDevTools#3572)
chore(main): release chrome-devtools-mcp 1.14.0 (ChromeDevTools#3462)