Open Bug 1564163 (dbg-impl-cleanup) Opened 3 years ago Updated 1 year ago

[jsdbg2] Debugger implementation cleanup [meta]


(Core :: JavaScript Engine, task, P3)





(Reporter: jimb, Unassigned)


(Depends on 9 open bugs, Blocks 1 open bug)


(Keywords: meta)

SpiderMonkey's Debugger API, first added in 2011, has cheerfully supported the Firefox devtools across several generations of JavaScript JITs, but its implementation is showing its age. Its interactions with the garbage collector and just-in-time compilers are obscure. Despite having extensive unit tests, Debugger is frequently implicated in fuzzer-blocking bugs. Its support for Web Assembly evolves slowly, if at all. SpiderMonkey engineers cringe when tracking down a bug leads them into the Debugger's territory. Even Debugger's original designers encounter a steady stream of unexpected obstacles when adding support for new ECMAScript features like generators and asynchronous functions.

In any software project, for engineers to be able to accurately estimate the time required to implement a change, certain preconditions must hold:

  1. The features that Debugger provides must have clear, accurate documentation.

  2. The demands that Debugger places on the rest of SpiderMonkey in order to implement those features must be documented similarly.

  3. Within the implementation, each component's requirements and promises must be evident to any reasonably skilled developer.

  4. The code must be thoroughly tested.

At the moment, only condition 4) is well in hand. As a result, estimates for Debugger work have a lot of uncertainty, and it is difficult for new engineers to contribute to the code. To have accurate estimates and a comfortable “bus factor”, we need to invest in refactoring and simplifying the Debugger implementation.

Alias: dbg-impl-cleanup
Depends on: 1564164
Depends on: 1564165
Depends on: 1564167
Depends on: 1564168
Depends on: 1564170
Depends on: 1564171
Depends on: 1564172
Depends on: 1564173
Depends on: 1564174
Depends on: 1564177
Depends on: 1564178
Depends on: 1564180
Depends on: 1564181
Depends on: 1564182
Priority: -- → P3
Depends on: 1564602
Depends on: 1565621
Depends on: 1566885
Depends on: 1567245
Depends on: 1567313
Depends on: 1569042
Depends on: 1569043
Depends on: 1569080
Depends on: 1572545
Depends on: 1575024
Depends on: 1577355
Depends on: 1586450
No longer depends on: 1586450
Depends on: 1590874
Depends on: 1590881
Depends on: 1594255
Depends on: 1596984
Depends on: 1600795
Depends on: 1600808
Depends on: 1602429
You need to log in before you can comment on or make changes to this bug.