Skip to content

Commit 2641547

Browse files
committed
Move reinitialization
1 parent 3b6e05f commit 2641547

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dwds/lib/src/services/chrome_proxy_service.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,6 @@ class ChromeProxyService implements VmServiceInterface {
12111211
);
12121212

12131213
if (pauseIsolatesOnStart) {
1214-
await _reinitializeForHotReload();
12151214
// If `pause_isolates_on_start` is enabled, pause and then the reload
12161215
// should finish later after the client removes breakpoints, reregisters
12171216
// breakpoints, and resumes.
@@ -1235,6 +1234,8 @@ class ChromeProxyService implements VmServiceInterface {
12351234
await pause(isolateId);
12361235
await pausedEvent;
12371236

1237+
await _reinitializeForHotReload();
1238+
12381239
// This lets the client know that we're ready for breakpoint management
12391240
// and a resume.
12401241
_streamNotify(

fixtures/_testHotReloadBreakpoints/web/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ external void log(String _);
1010
String get mainValue => 'main gen0';
1111

1212
void evaluate() {
13-
// Use a future as if we come across a breakpoint, evaluating this method
14-
// would never finish.
13+
// Use a future instead of directly calling because evaluating this method
14+
// with a breakpoint would never complete otherwise.
1515
Future.delayed(Duration(milliseconds: 10), printToConsole);
1616
}
1717

0 commit comments

Comments
 (0)