Skip to content

Commit 03c7a99

Browse files
authored
Prevent DevTools from automatically resuming on connection when there is a breakpoint (#8991)
1 parent 553ec56 commit 03c7a99

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

packages/devtools_app/lib/src/screens/debugger/breakpoint_manager.dart

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,17 @@ class BreakpointManager with DisposerMixin {
8787
);
8888
}
8989

90-
// Resume the isolate now that the breakpoints have been set:
91-
await serviceConnection.serviceManager.isolateManager.resumeIsolate(
92-
isolateRef,
93-
);
90+
// Maybe resume the isolate now that the breakpoints have been set:
91+
final isolate = await _service.getIsolate(_isolateRefId);
92+
final pauseEventKind = isolate.pauseEvent?.kind;
93+
if ([
94+
EventKind.kPauseStart,
95+
EventKind.kPausePostRequest,
96+
].contains(pauseEventKind)) {
97+
await serviceConnection.serviceManager.isolateManager.resumeIsolate(
98+
isolateRef,
99+
);
100+
}
94101
}
95102

96103
void clearCache({required bool isServiceShutdown}) {

packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,25 @@ To learn more about DevTools, check out the
1515

1616
## General updates
1717

18+
* Fixed various memory leaks and lifecycle issues. -
19+
[#8901](https://github.com/flutter/devtools/pull/8901),
20+
[#8902](https://github.com/flutter/devtools/pull/8902),
21+
[#8907](https://github.com/flutter/devtools/pull/8907),
22+
[#8917](https://github.com/flutter/devtools/pull/8917),
23+
[#8932](https://github.com/flutter/devtools/pull/8932),
24+
[#8933](https://github.com/flutter/devtools/pull/8933),
25+
[#8934](https://github.com/flutter/devtools/pull/8934),
26+
[#8935](https://github.com/flutter/devtools/pull/8935),
27+
[#8937](https://github.com/flutter/devtools/pull/8937),
28+
[#8953](https://github.com/flutter/devtools/pull/8953),
29+
[#8969](https://github.com/flutter/devtools/pull/8969),
30+
[#8970](https://github.com/flutter/devtools/pull/8970),
31+
[#8975](https://github.com/flutter/devtools/pull/8975)
1832
* Fix a bug with the review history on disconnect experience. -
1933
[#8985](https://github.com/flutter/devtools/pull/8985)
34+
* Fixed bug where DevTools would automatically resume instead of
35+
pausing on breakpoint on connection. -
36+
[#8991](https://github.com/flutter/devtools/pull/8991)
2037

2138
## Inspector updates
2239

0 commit comments

Comments
 (0)