feat: include stack trace in 'get_console_message' tool#740
Merged
Conversation
96df988 to
c869965
Compare
31bb922 to
1fd2f86
Compare
OrKoN
reviewed
Jan 20, 2026
OrKoN
reviewed
Jan 20, 2026
OrKoN
reviewed
Jan 20, 2026
This is the stack trace of the console message itself. If the argument is an Error object or an "Error.stack" like string we don't do anything special (yet). The stack trace is source mapped if source maps are available. For now, this only works for console messages of the main page target as puppeteer doesn't tell us yet from which target a console message is coming from.
1fd2f86 to
72ddc1f
Compare
OrKoN
approved these changes
Jan 20, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 27, 2026
🤖 I have created a release *beep* *boop* --- ## [0.14.0](chrome-devtools-mcp-v0.13.0...chrome-devtools-mcp-v0.14.0) (2026-01-27) ### 🎉 Features * add a skill for using chrome-devtools-mcp ([#830](#830)) ([aa0a367](aa0a367)) * add background parameter to new_page tool ([#837](#837)) ([d756888](d756888)) * allow skipping snapshot generation for input tools ([#821](#821)) ([4b8e9f2](4b8e9f2)) * include stack trace in 'get_console_message' tool ([#740](#740)) ([a3a0021](a3a0021)) * support device viewport and user agent emulation ([#798](#798)) ([a816967](a816967)) * support filePath for network request and response bodies ([#795](#795)) ([6d0e4ca](6d0e4ca)) ### 🛠️ Fixes * handle beforeunload dialogs in navigations ([#788](#788)) ([9b21f8b](9b21f8b)) * improve error handling for console messages ([#844](#844)) ([dc43ede](dc43ede)) * improve error reporting when retrieving the element ([#845](#845)) ([f7dd003](f7dd003)) * improve performance tool description ([#800](#800)) ([aa9a176](aa9a176)) * increase timeouts for long text input ([#787](#787)) ([a83a338](a83a338)) * make request and response handling more robust ([#846](#846)) ([695817f](695817f)) * re-use node ids across snapshots ([#814](#814)) ([a6cd2cd](a6cd2cd)) ### 📄 Documentation * add a mention of evals into contributing.md ([#773](#773)) ([9a31ac7](9a31ac7)) * document how to add extensions to gemini-cli ([#834](#834)) ([0610d11](0610d11)) * update auto-connect docs ([#779](#779)) ([a106fba](a106fba)) * Update README.md to include a link to Android debugging ([#783](#783)) ([6e52e66](6e52e66)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the stack trace of the console message itself. If the argument is an Error object or an "Error.stack" like string we don't do anything special (yet).
The stack trace is source mapped if source maps are available.
The function matches the target ID of the console message to the
SDK.Targetof DevTools. The only oddity is that DevTools works in a lazy manor: It creates stack traces upfront and as source maps come in, stack traces get updated. This does not work for the MCP server. Instead, we wait for script parsed events and source maps to attach before creating the stack trace. Since this could take potentially a while, we guard it with a time out.