Skip to content

Hot Reload results in debugger pausing with "PauseInterrupted" instead of "PauseBreakpoint" #1416

@DanTup

Description

@DanTup

In the Dart-Code integration tests there are some Flutter web tests that perform Hot Reloads and ensure breakpoints are still hit after a reload. Recently (perhaps with the last stable Flutter release?) they've started failing because the pause event is PauseInterrupted instead of PauseBreakpoint (and has no frame information with it) after the reload.

The breakpoint is initially hit (at startup) normally:

{
	"jsonrpc": "2.0",
	"method": "streamNotify",
	"params": {
		"streamId": "Debug",
		"event": {
			"type": "Event",
			"kind": "PauseBreakpoint",
			"timestamp": 1632747746674,
			"isolate": {
				"type": "@Isolate",
				"id": "1",
				"number": "1",
				"name": "main()",
				"isSystemIsolate": false
			},
			"pauseBreakpoints": [
				{
					"type": "Breakpoint",
					"id": "bp/3#49",
					"breakpointNumber": 584,
					"enabled": true,
					"resolved": true,
					"location": {
						"type": "SourceLocation",
						"script": {
							"type": "@Script",
							"id": "3",
							"uri": "package:flutter_hello_world/main.dart"
						},
						"tokenPos": 1438
					}
				}
			],
			"topFrame": {
				"// SNIP...":""
			}
		}
	}
}

But after the reload, but pause event looks like this:

{
	"jsonrpc": "2.0",
	"method": "streamNotify",
	"params": {
		"streamId": "Debug",
		"event": {
			"type": "Event",
			"kind": "PauseInterrupted",
			"timestamp": 1632747768591,
			"isolate": {
				"type": "@Isolate",
				"id": "1",
				"number": "1",
				"name": "main()",
				"isSystemIsolate": false
			}
		}
	}
}

I don't know if this is an intended change, but wanted to raise it before changing anything in Dart-Code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions