-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Description
This was raised at Dart-Code/Dart-Code#3898, but I think it's a DWDS issue. I can reproduce it on latest Flutter master.
- Create a new project with
flutter create - Add a new breakpoint to the
buildmethod in_MyHomePageState - Debug on Chrome device and wait for the breakpoint to be hit
- The debugger pauses in
package:flutter/src/widgets/binding.dart
{
"type": "Event",
"kind": "PauseBreakpoint",
"timestamp": 1648811630946,
"isolate": {
"type": "@Isolate",
"id": "1",
"number": "1",
"name": "main()",
"isSystemIsolate": false
},
"pauseBreakpoints": [
{
"type": "Breakpoint",
"id": "bp/3#72",
"breakpointNumber": 609,
"enabled": true,
"resolved": true,
"location": {
"type": "SourceLocation",
"script": {
"type": "@Script",
"id": "3",
"uri": "package:dartcode_flutter_3898/main.dart"
},
"tokenPos": 1368
}
}
],
"topFrame": {
"type": "Frame",
"index": 602,
"code": {
"type": "@Code",
"id": "610",
"name": "scheduleAttachRootWidget",
"kind": "Dart"
},
"location": {
"type": "SourceLocation",
"script": {
"type": "@Script",
"id": "68",
"uri": "package:flutter/src/widgets/binding.dart"
},
"tokenPos": 73501
},
"kind": "AsyncCausal"
}
}In VS Code we detect this is not user-code and walk up the stack to the first user-code frame, which is:
{
"type": "Frame",
"index": 605,
"code": {
"type": "@Code",
"id": "612",
"name": "main$",
"kind": "Dart"
},
"location": {
"type": "SourceLocation",
"script": {
"type": "@Script",
"id": "3",
"uri": "package:dartcode_flutter_3898/main.dart"
},
"tokenPos": 1394
},
"kind": "AsyncCausal"
},
The tokenPos is 1394 and the relevant part of tokenPosTable is:
[
4,
1393,
24,
1394,
3
],
This says line 4, character 3, which is the runApp call, so the breakpoint is here:
But the user ends up here:
The actual reported top frame of the stack is here:
Relevant logs:
Metadata
Metadata
Assignees
Labels
No labels


