Repository navigation
feat: add logpoints built on the DevTools BreakpointManager - #3211
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
7b8b091 to
1afa1b3
Compare
|
@OrKoN all review comments are addressed in 8a03990 (single The remaining blocker is the I'll keep the PR as a draft until the export lands. |
|
Thanks! Once https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8608769 lands and the submodule is bumped here, I'll switch the PR to |
| name: SET_LOGPOINTS_TOOL_NAME, | ||
| description: `Set the logpoints of the selected page. A logpoint logs the value of one or more expressions to the console every time a line of code executes, without pausing execution and without modifying the source code. It works like logpoints in the Chrome DevTools Sources panel and replaces temporarily instrumenting code with console.log() calls. The given list is the complete set of logpoints for the page: logpoints not in the list are removed, new ones are added and the expression of a logpoint at an existing location is replaced; an empty list removes all logpoints. Locations are given as the URL of a script as served to the browser or as an original source file (for example a TypeScript file), which is resolved through the source maps of the parsed scripts and re-resolved automatically when a rebuilt bundle is loaded. The logged output appears as regular console messages that can be read with ${LIST_CONSOLE_MESSAGES_TOOL_NAME}. Logpoints stay active across page reloads and navigations until they are removed or the page is closed. The response lists the resulting logpoints and where they are bound.`, | ||
| annotations: { | ||
| category: ToolCategory.DEBUGGING, |
There was a problem hiding this comment.
let's create a new category and a CLI flag for logpoints per #2584 (comment) (on by default)
There was a problem hiding this comment.
Done in c9df6db: added ToolCategory.LOGPOINTS with the generated --category-logpoints flag, on by default (--no-category-logpoints turns it off), and the tool now uses that category.
🤖 Addressed by Claude Code
There was a problem hiding this comment.
@johan-gorter The commit that you mention did not land on main, would you please open a new PR with the change?
There was a problem hiding this comment.
there is no need to create the logpoint category, we reversed this decision in the discussion on the issue.
cee2acd to
dab01ba
Compare
OrKoN
left a comment
There was a problem hiding this comment.
Let's address the following:
DevTools universe integration
- Export
BreakpointManager,Workspace(UISourceCode,UILocation,projectTypes) andDebuggerModelEventsfromthird_party/devtools-frontend/mcp/mcp.tsin a devtools-frontend CL, then remove the directfront_end/models/...imports insrc/third_party/index.ts. The direct imports bypass theno-restricted-importsboundary, andmcp.tsrequires foundation unit tests for each exported class. - In
LogpointManager.#workspace, use theuniverse.workspacegetter instead ofuniverse.context.get(Workspace.Workspace.WorkspaceImpl). The getter exists at the current submodule revision and removes one reason for the directWorkspaceimport. - Fix the
Common.Revealer.reveal()call inBreakpointManager.setBreakpoint()upstream (move it to the Sources panel caller), and removeregisterUILocationRevealer()fromsrc/devtools/DevtoolsUtils.ts. A model in the foundation layer must not reveal UI, and the call isvoid-ed, so a missing revealer causes an unhandled rejection in Node. If the upstream fix must wait, register the revealer once in the existing one-time DevTools init function, not increateTargetUniverse()with a module-level flag. - Replace
#ensureSourceMapsLoadOnParse()with a toggle ofDevTools.SourceMapManager.lazyLoadingSettingDescriptoronuniverse.settings(set tofalsewhile logpoints exist,truewhen none exist).SourceMapManager.attachSourceMap()reads this setting on each attach, so the toggle gives eager loading without the casted'ParsedScriptSource'event name, theinstanceof DevTools.DebuggerModelcheck and the microtask workaround. - State in the tool description that original-source locations need source maps enabled (
--no-source-mapsandsyncSourceMaps()turn them off), and that scripts in workers and out-of-process iframes are not supported. The universe auto-starts onlyDebuggerModelon the main target, so these logpoints fail with "no match" or stay silently unbound. - In
McpPage.dispose(), clear the logpoint records without a call tobreakpoint.remove(). The removal sendsDebugger.removeBreakpointafteruniverse.dispose()on a session that is about to detach, and the page closes anyway.
Design and AGENTS.md compliance
- Address the open request from OrKoN: add a new tool category and a CLI flag for logpoints (on by default), per the #2584 comment. The diff still uses
ToolCategory.DEBUGGING. - Remove the
ascasts intoUserCondition()andparsedScriptSourceinsrc/LogpointManager.ts.AGENTS.mdforbidsas; items 1 and 4 remove the need for the second cast. - Revert the
typeof tool !== 'function'skip insrc/tools/tools.tsand moveLIST_CONSOLE_MESSAGES_TOOL_NAMEto a module thatcreateTools()does not iterate. The skip hides real export mistakes in all tool modules. - Extract the duplicated project-type filter in
#sourceUrls()and#matchUISourceCode()into one helper.AGENTS.mdrequires one helper for repeated code. - Remove the public
McpPage.getLogpoints(), or give it a production caller (for examplelist_pagesoutput). Only tests call it now, andAGENTS.mdforbids public methods that exist only for tests. - On the "No executable code" error path in
setLogpoints(), add the resulting logpoint list to the response before the error. The other logpoints are applied, so the agent needs the current state. - Remove the mutation
record.logpoint.generatedLocations = ...in#snapshot(). The method returns a copy, so the stored field is stale state with no reader. - Change the copyright year to 2026 in
src/LogpointManager.ts,src/tools/logpoints.tsandtests/tools/logpoints.test.ts. These are new files.
Tests
- Replace the real-browser tests in
tests/tools/logpoints.test.tswith mock-based handler tests (createHandlerMocks(),sinon.assert.calledOnceWithExactly(page.setLogpoints, ...)). Move the browser scenarios totests/LogpointManager.test.tsand keep one run per scenario.AGENTS.mdlimits handler tests to argument checks. - Add tests for
McpPage.setLogpoints()with an empty list (noLogpointManageris created) and forMcpPage.dispose()(records are released). No test covers these branches now. - Replace
assert.ok(a.includes(x) && a.includes(y))with exact assertions or snapshots of the formatter output. Combined boolean checks hide which condition failed.
|
Status of the review items, all in c9df6db unless noted: DevTools universe integration
Design Tests The branch was rebased on top of your rebase of the PR branch; |
|
I think the submodule was bumped, please send the upstream fix after testing it in the local checkout. |
Adds set_logpoint, list_logpoints, remove_logpoint and list_scripts so agents can log runtime values at a line without pausing and without editing source code (ChromeDevTools#2584). Logpoints are DevTools breakpoints with isLogpoint set, created through the BreakpointManager of the page's DevTools universe. The breakpoint manager builds the logging condition, resolves original source files through source maps, substitutes minified variable names and re-binds the breakpoint when scripts and source maps re-attach after reloads and rebuilds. LogpointManager only maps tool URLs and 1-based positions onto workspace source codes and keeps the ids handed out to tools. BreakpointManager and the Workspace module are not yet exported from devtools-frontend/mcp/mcp.ts, so they are imported directly in src/third_party/index.ts for now (marked with a TODO).
Addresses review feedback: one set_logpoints tool receives the complete set of logpoints for the page (as "<url>:<line>[:<col>] <expression>" strings), removes the ones left out, adds new ones and replaces the expression at existing locations, and responds with the resulting state. list_logpoints, remove_logpoint and list_scripts are gone; when a url matches nothing, the error lists sources with the same file name so the model can pick from source positions alone. Formatting moves into LogpointFormatter with toJSON() and toString() built from the JSON output, and the skill keeps a one-line note in the tool selection list.
Use the BreakpointManager that the DevTools Universe creates (universe.breakpointManager) instead of the global instance(); the submodule bump to 7a70ee1 brought that in. Restore tool_call_metrics.json from main and regenerate it so only set_logpoints is added. Add snapshot tests for LogpointFormatter and reuse the exported list_console_messages tool name from the console tools.
Add a logpoints tool category with an on-by-default --category-logpoints flag. Use the universe's workspace getter, toggle lazy source-map loading instead of a parse listener, register the no-op revealer in the one-time DevTools init, and drop the cast helpers. Keep the applied logpoints in a LogpointError so the tool can report them before failing. Replace the browser-based handler tests with mock-based ones, move the browser scenarios to tests/LogpointManager.test.ts and add McpPage tests for the empty list and dispose. Move the console tool name to a module that createTools() does not iterate.
The submodule now includes devtools-frontend CL 8608769, so the direct front_end/models imports and their eslint exemptions are gone.
c9df6db to
268b5bf
Compare
|
Done in 268b5bf: rebased onto main with the For the |
|
Correction to my previous comment: I will not be uploading the CL myself; could you land it on the devtools-frontend side? Here is the patch, tested as described above (it applies to current main with diff --git a/front_end/models/breakpoints/BreakpointManager.ts b/front_end/models/breakpoints/BreakpointManager.ts
index c41c053..329b522 100644
--- a/front_end/models/breakpoints/BreakpointManager.ts
+++ b/front_end/models/breakpoints/BreakpointManager.ts
@@ -330,10 +330,6 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
enabled, isLogpoint, origin);
if (uiSourceCode === compatibleUiSourceCode) {
- if (normalizedLocation.id() !== uiLocation.id()) {
- // Only call this on the uiSourceCode that was initially selected for breakpoint setting.
- void Common.Revealer.reveal(normalizedLocation);
- }
primaryBreakpoint = breakpoint;
}
}
diff --git a/front_end/panels/sources/DebuggerPlugin.ts b/front_end/panels/sources/DebuggerPlugin.ts
index f5c2141..40e25ea 100644
--- a/front_end/panels/sources/DebuggerPlugin.ts
+++ b/front_end/panels/sources/DebuggerPlugin.ts
@@ -1673,6 +1673,13 @@ export class DebuggerPlugin extends Plugin {
const bp = await this.breakpointManager.setBreakpoint(
this.uiSourceCode, lineNumber, columnNumber, condition, enabled, isLogpoint,
Breakpoints.BreakpointManager.BreakpointOrigin.USER_ACTION);
+ // The breakpoint manager normalizes the location (for example to the
+ // authored file of a source-mapped script). Reveal it when it moved.
+ const uiLocation = new Workspace.UISourceCode.UILocation(this.uiSourceCode, lineNumber, columnNumber);
+ const normalizedLocation = await this.breakpointManager.debuggerWorkspaceBinding.normalizeUILocation(uiLocation);
+ if (normalizedLocation.id() !== uiLocation.id()) {
+ void Common.Revealer.reveal(normalizedLocation);
+ }
this.breakpointWasSetForTest(lineNumber, columnNumber, condition, enabled);
if (bp) {
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.BREAKPOINT_ADDED); |
|
Yeah, we should address those. I believe in previous iterations we established that the agent should be encouraged to stringify logpoints, did it not do it for your case? that would eliminate issues with maps/sets not being visible. We should probably still think about solving that independently. |
|
@natorion thanks for the thorough test, this matches what Opus reported above. Three fixes for this PR: (1) wrap the logged expression in try/catch so a failing logpoint reports @OrKoN to your question: no earlier round settled on stringify; my 2026-10-22 change said the opposite and was wrong for the list tool. Rendering object arguments as JSON in the concise console output would remove the need for either workaround, and I agree that belongs in a separate change. HMR |
…served in place A logpoint expression that throws now logs "Logpoint <url>:<line> threw: <error>" instead of an empty error message, by evaluating the expression in a try/catch inside the console.log() call that DevTools builds. A file that a dev server transpiles in place, served at the URL of its original source with a source map pointing back at it, now resolves to the original source so that line numbers match the file on disk. The description says how objects appear in list_console_messages and get_console_message.
|
The three fixes are in 4298a9f: failing expressions log 🤖 Addressed by Claude Code |
|
@natorion do you have a chance to re-test on your project? |
OrKoN
left a comment
There was a problem hiding this comment.
Please check the following items as well:
-
Do not send a condition that starts with
...(wrapExpression()insrc/LogpointManager.ts).- Change: Move the try/catch wrapper into devtools-frontend
Breakpoint.backendCondition()afterjavaScriptSubstitute(), or remove the wrapper from this PR. - Why:
backendCondition()passes the user condition toAcorn.parse()as a program;...(() => {...})()is aSyntaxError, the.catch(() => condition)fallback skips the substitution, and original variable names at minified locations now throwReferenceError. The tests usets.transpileModule, which keeps the names, so they do not detect this; add a test with a generated script whose names differ from the source names.
- Change: Move the try/catch wrapper into devtools-frontend
-
Compile the exact text that is sent to the backend in
validateExpression()(src/LogpointManager.ts).- Change: If the wrapper stays, validate
console.log(${wrapExpression(expression, '')})instead ofconsole.log(${expression}). - Why:
a) + (bcompiles asconsole.log(a) + (b)but fails insidereturn [a) + (b];, so the error occurs at runtime instead of at validation.
- Change: If the wrapper stays, validate
-
Report the source-map timeout in the first branch of
#findUISourceCode()(src/LogpointManager.ts).- Change: Set
timedOutwhen the wait for the matched script's source map aborts, and include the retry hint or throw. - Why: After the timeout the logpoint is set on the transpiled script with the line numbers of the served file, which is the
vite devmismatch the PR fixes, and the response gives no hint.
- Change: Set
-
List the
createStackTrace()behavior change in the PR description (src/devtools/DevtoolsUtils.ts).- Change: State that a stack trace now continues with unresolved frames when a script does not appear within 1 s, or keep the rejection from
main. - Why: On
main,.catch()without a handler passes the timeout rejection through andConsoleFormatterdrops the stack; the PR swallows the rejection, which changeslist_console_messagesandget_console_messageoutput.
- Change: State that a stack trace now continues with unresolved frames when a script does not appear within 1 s, or keep the rejection from
-
Merge
waitForMessageMatching()intowaitForMessage()(tests/LogpointManager.test.ts).- Change: Accept
string | RegExpin one helper that useswaitExecutionFor(). - Why: The two functions repeat the same poll with different loop code;
AGENTS.mdrequires one helper for a repeated block.
- Change: Accept
The try/catch wrapper made the condition an invalid program, so DevTools skipped the substitution of original variable names at minified locations. The expression is sent as given again; a test with a hand-written source map for a minified script covers the substitution. A source map that does not load in time for a script served at the URL of its original source now raises an error instead of binding to the served script's lines. The stack trace code keeps rejecting when a script does not appear in time, as on main. The test helpers for console messages are merged into one.
|
All five items are in bea0953:
🤖 Addressed by Claude Code |
|
I re-tested Here is how the agent experience looked compared to the previous test: 1.) 2.) Production build with source maps ( 3.) Updated One tiny non-blocking detail: the From a user and agent UX perspective this feels solid and ready to land - lgtm |
|
@szuend could you please review the breakpoint integration in the latest version? |
szuend
left a comment
There was a problem hiding this comment.
DevtoolsUtils and LogpointManager lgtm
|
Thank you @OrKoN, @szuend and @natorion. Most of this code was written with Claude Fable 5.1 All the best for chrome-devtools-mcp. |
|
Ha, well, I guided Gemini to do the testing :-) |
…ed-stack-traces Resolve the conflict in createStackTrace() with the waitForSourceMaps() refactor from ChromeDevTools#3211: the per-script wait keeps its catch and URL check, and only the scripts that match their frames' URLs go to waitForSourceMaps() and keep their script ids.
|
@johan-gorter there seem to be some flakiness with the log point tests #3395 (comment) do you have an idea what might the reason? If not we will take a look. |
|
@OrKoN thanks for the heads-up. I looked into it and I think it is a race in the logpoint code rather than in one test. What the CI logs show It is not only the "re-binds after a rebuilt bundle" test. The same error hits four different
Hypothesis
If that is right, it is not only test flakiness: an agent that navigates and sets a logpoint straight away can get the same error. What I could not confirm I did not manage to reproduce it locally (Windows, navigate + immediate Proposed fix In |
|
Trying to fix it in #findUISourceCode sounds good to me! cc @szuend |
🤖 I have created a release *beep* *boop* --- ## [1.13.0](ChromeDevTools/chrome-devtools-mcp@chrome-devtools-mcp-v1.12.0...chrome-devtools-mcp-v1.13.0) (2026-11-11) ### 🎉 Features * add logpoints built on the DevTools BreakpointManager ([ChromeDevTools#3211](ChromeDevTools#3211)) ([0877ee0](ChromeDevTools@0877ee0)) * add page-scoped network mocks ([ChromeDevTools#3384](ChromeDevTools#3384)) ([1d692d3](ChromeDevTools@1d692d3)) * support upstream network mock responses ([ChromeDevTools#3420](ChromeDevTools#3420)) ([c4bf342](ChromeDevTools@c4bf342)) ### 🛠️ Fixes * **config:** accept config files with a UTF-8 BOM ([ChromeDevTools#3365](ChromeDevTools#3365)) ([63170b1](ChromeDevTools@63170b1)) * **console:** stop resolving a cyclic Error.cause chain after 10 causes ([ChromeDevTools#3338](ChromeDevTools#3338)) ([172656a](ChromeDevTools@172656a)) * disable set_logpoints when --no-javascript-evaluation is set ([ChromeDevTools#3415](ChromeDevTools#3415)) ([11fcc59](ChromeDevTools@11fcc59)), closes [ChromeDevTools#3414](ChromeDevTools#3414) * **extensions:** say list_extensions only lists unpacked extensions ([ChromeDevTools#3433](ChromeDevTools#3433)) ([1383bb9](ChromeDevTools@1383bb9)) * ignore an invalid cached version in the update check ([ChromeDevTools#3392](ChromeDevTools#3392)) ([3a9f378](ChromeDevTools@3a9f378)) * **input:** validate press_key and submitKey parameters in Zod schema ([ChromeDevTools#3382](ChromeDevTools#3382)) ([375a269](ChromeDevTools@375a269)) * **network:** start an empty request list for navigations without a request ([ChromeDevTools#3357](ChromeDevTools#3357)) ([b701776](ChromeDevTools@b701776)) * normalize non-Error values thrown by tool handlers ([ChromeDevTools#3068](ChromeDevTools#3068)) ([535a3dc](ChromeDevTools@535a3dc)) * **performance:** error when performance_stop_trace is called on a non-recording page ([ChromeDevTools#2971](ChromeDevTools#2971)) ([ChromeDevTools#3117](ChromeDevTools#3117)) ([1ab630a](ChromeDevTools@1ab630a)) * **plugin:** launch the Claude Code MCP server with npx --prefix ([ChromeDevTools#3353](ChromeDevTools#3353)) ([a24334d](ChromeDevTools@a24334d)) * preserve task serialization on request cancellation ([ChromeDevTools#3079](ChromeDevTools#3079)) ([03fd4e8](ChromeDevTools@03fd4e8)) * report page loads that keep the URL ([ChromeDevTools#3395](ChromeDevTools#3395)) ([3cc38bb](ChromeDevTools@3cc38bb)) * save binary request bodies byte for byte ([ChromeDevTools#3404](ChromeDevTools#3404)) ([e3eb901](ChromeDevTools@e3eb901)) * suggest --headless when Chrome cannot find an X server ([ChromeDevTools#3428](ChromeDevTools#3428)) ([8b0856a](ChromeDevTools@8b0856a)) * **url:** unwrap view-source: before all scheme checks in validateUrl ([ChromeDevTools#3335](ChromeDevTools#3335)) ([7275268](ChromeDevTools@7275268)) * **wait:** explain whitespace-sensitive text matching ([ChromeDevTools#3350](ChromeDevTools#3350)) ([81a0379](ChromeDevTools@81a0379)) ### 📄 Documentation * add Pi client configuration ([ChromeDevTools#3364](ChromeDevTools#3364)) ([bc0d93e](ChromeDevTools@bc0d93e)) * clarify custom browser launch and connection options ([ChromeDevTools#3386](ChromeDevTools#3386)) ([7e10c08](ChromeDevTools@7e10c08)) * **input:** note that press_key cannot drive native <select> popups on macOS ([ChromeDevTools#3288](ChromeDevTools#3288)) ([8e79bd0](ChromeDevTools@8e79bd0)) ### ⚡ Performance * **memory:** drop async parents of request initiators in NetworkCollector ([ChromeDevTools#3345](ChromeDevTools#3345)) ([ca6f834](ChromeDevTools@ca6f834)), closes [ChromeDevTools#3344](ChromeDevTools#3344) ### 🏗️ Refactor * re-export only used Zod runtime members from third_party barrel ([ChromeDevTools#3439](ChromeDevTools#3439)) ([6b056c8](ChromeDevTools@6b056c8)) * reuse Zod schemas and validate integer viewport dimensions ([ChromeDevTools#3367](ChromeDevTools#3367)) ([3c609da](ChromeDevTools@3c609da)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Alex Rudenko <[email protected]>
|
Cv |
…ChromeDevTools#3461) Fixes ChromeDevTools#3460. ### Problem Setting a logpoint right after a navigation can fail with `No parsed script or original source file matches "…"`. This is what makes the `LogpointManager` tests flaky (see the runs listed in ChromeDevTools#3460). A navigation is awaited on the session of the page, while scripts reach the DevTools `DebuggerModel` through the session of the DevTools universe. The `Debugger.scriptParsed` events can still be in flight when the navigation is done, and `#findUISourceCode` threw right away when no source matched. ### Fix When nothing matches, `#findUISourceCode` now does one round trip on the session of the universe and matches again. Events and responses of one session are ordered, so once the response arrives the model knows every script the page has parsed so far. This is a bit different from what I described in ChromeDevTools#3211 (comment). Waiting for `ParsedScriptSource` events with a timeout would make every mistyped URL take 5 seconds before the error with the similar file names is reported. The round trip costs one command and only in the no-match path. The existing source-map wait is unchanged and runs after it. `Runtime.getHeapUsage` is used for the round trip because it is read-only and handled in the renderer, like the debugger events. Happy to switch to another command if you prefer one. ### Verification - I could not reproduce the race locally (Windows, about 175 iterations of navigate + immediate `setLogpoints` under CPU load), so there is no regression test and the fix rests on the analysis above. CI on the macOS runners is the real check. - `tests/LogpointManager.test.ts` passes with the fix, and a loop of 100 navigations with an immediate `setLogpoints` passes. - I ran the build, tests and `npm run format` with this patch applied on the pre-GN checkout of the logpoints branch (identical `LogpointManager.ts` and test file), because `npm run sync` does not complete on my machine. The GN build has only run in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Implements #2584 (logpoints) on top of the devtools-frontend logpoint code, as requested in #2584 (comment).
What
One tool,
set_logpoints, in thedebuggingcategory (--category-debuggingturns it off together with the other debugging tools). It takes the complete set of logpoints for the selected page as strings formatted<url>:<lineNumber>[:<columnNumber>] <expression>:urlis the URL of a script as served to the browser or the path of an original source file from a source map, matched exactly or as a path suffix (e.g.src/app.ts);expressionis formatted likeconsole.log()arguments and evaluated in the scope of the location (original variable names work at source-mapped locations);Output arrives as ordinary console messages via
list_console_messages. A logpoint on a line that runs during initial script evaluation can miss executions that happen before the source map is fetched after a rebuild; the tool response and the skill note say so.How
A logpoint is a DevTools breakpoint with
isLogpoint = true, created throughBreakpointManager.setBreakpoint()on theBreakpointManagerthat the DevToolsUniverseof the page constructs (universe.breakpointManager). The breakpoint manager builds the backend condition, resolves original source positions throughDebuggerWorkspaceBinding, substitutes minified variable names, normalizes locations (a generated location maps to its original source line) and re-binds the breakpoint when scripts and source maps re-attach after reloads and rebuilt bundles. No CDP breakpoint calls are made directly.src/LogpointManager.tsis the adapter: it mapsurlonto a workspaceUISourceCode(loading source maps on demand, since the universe loads them lazily), callssetBreakpoint(), and keeps the resultingBreakpointobjects; two requested locations that normalize to the same breakpoint share one entry. While logpoints exist, the lazy source-map setting of the universe is switched off so that the original sources of a rebuilt bundle re-appear and the breakpoint can re-bind.BreakpointManagerandWorkspacecome from themcp.tsentrypoint (devtools-frontend CLs 8608769 and 8616700, both in the pinned submodule).src/formatters/LogpointFormatter.tsrenders the result (toJSON()/toString()).src/tools/toolNames.tsholds thelist_console_messagesname that the tool description references.Limitations
--no-source-mapsturns them off).Tests
tests/LogpointManager.test.ts: real-browser scenarios (logging without pausing, path-suffix matching, reloads; replace/remove/clear; source-mapped locations and re-binding after a rebuilt bundle; locations that normalize to the same breakpoint; unknown, ambiguous and non-executable locations) plus unit tests forparseLogpointandvalidateExpression.tests/tools/logpoints.test.ts: mock-based handler tests.tests/formatters/LogpointFormatter.test.ts: snapshot tests.tests/McpPage.test.ts:setLogpoints()with an empty list, manager reuse, anddispose().🤖 Generated with Claude Code