fix(debugger): keep breakpoint id in sync after update#8968
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Overall package sizeSelf size: 6.25 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 821.74 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmark execution time: 2026-06-18 12:13:41 Comparing candidate commit 5ccd11f in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1952 metrics, 13 unstable metrics.
|
When debugger conditions change, the devtools client removes and recreates the inspector breakpoint. V8 may return a new breakpoint id for the new breakpoint, but the location map kept the old id. Update the stored breakpoint id after replacement so later removals and condition updates use the active inspector breakpoint. Add a regression test with changing breakpoint ids to catch stale state.
7323631 to
5ccd11f
Compare
When debugger conditions change, the devtools client removes and recreates the inspector breakpoint. V8 may return a new breakpoint id for the new breakpoint, but the location map kept the old id. Update the stored breakpoint id after replacement so later removals and condition updates use the active inspector breakpoint. Add a regression test with changing breakpoint ids to catch stale state.
When debugger conditions change, the devtools client removes and recreates the inspector breakpoint. V8 may return a new breakpoint id for the new breakpoint, but the location map kept the old id. Update the stored breakpoint id after replacement so later removals and condition updates use the active inspector breakpoint. Add a regression test with changing breakpoint ids to catch stale state.
When debugger conditions change, the devtools client removes and recreates the inspector breakpoint. V8 may return a new breakpoint id for the new breakpoint, but the location map kept the old id. Update the stored breakpoint id after replacement so later removals and condition updates use the active inspector breakpoint. Add a regression test with changing breakpoint ids to catch stale state.

What does this PR do?
Keeps the debugger devtools client's stored breakpoint id in sync when a breakpoint is removed and recreated to update its condition.
Adds a regression test that makes
Debugger.setBreakpointreturn a new id for each replacement, then verifies later updates remove the active breakpoint id instead of the stale one.Motivation
When multiple probes share a location and their combined condition changes, the client replaces the inspector breakpoint. V8 can return a different breakpoint id for the replacement. We already moved the probe map to the new id, but the location map still held the old id, so later removals or updates could target stale state.