dart-lang / dart-lang/webdev

Local variables that are DOM elements are not included in the "topFrame" field when pausing on breakpoints

Open
#2,180 1 comment 0 reactions 0 assignees View on GitHub
P2 package:dwds triaged
Dominant language
Dart
Stars
224
Forks
94
Avg merge
7h 14m
Merged PRs (30d)
2

Description

Here I have two local variables, `a` and `i`. `a` is a standard class and shows in the Locals section. `i` is a DOM element and does not (I don't know if that's the reason, but it's the only obvious difference):

![image](https://github.com/dart-lang/webdev/assets/1078012/11cfd035-2515-4a6e-8d41-f7fbb7bb4057)

Specifically, it's missing from the `vars` of the `topFrame` in the `PauseBreakpoint` event:

```js
{
"jsonrpc": "2.0",
"method": "streamNotify",
"params": {
"streamId": "Debug",
"event": {
"type": "Event",
"kind": "PauseBreakpoint",
// ...
"topFrame": {
// ...
"vars": [
{
"type": "BoundVariable",
"name": "this",
"value": // ...
},
{
"type": "BoundVariable",
"name": "context",
"value": // ...
},
{
"type": "BoundVariable",
"name": "a",
"value": // ...
}
],
"kind": "Regular"
}
}
}
}
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the breakpoint pause and inspect the Debug stream's PauseBreakpoint event, especially topFrame.vars, using the DOM-element local described in the issue. Done means the DOM local variable appears in topFrame.vars alongside the other locals.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.