@@ -406,41 +406,57 @@ void main() {
406
406
file: mainFile,
407
407
breakpointMarker: capturedStringMarker,
408
408
);
409
+ print ('added breakpoint' );
409
410
410
411
final oldLog = "log('\$ mainValue');" ;
411
412
final newLog = "log('\$ {closure()}');" ;
412
413
await makeEditAndRecompile (mainFile, oldLog, newLog);
414
+ print ('recompiled' );
413
415
414
416
bp =
415
417
(await hotReloadAndHandlePausePost ([
416
418
(file: mainFile, breakpointMarker: capturedStringMarker, bp: bp),
417
419
])).first;
418
420
421
+ print ('hot reload and handled pausepost' );
422
+
419
423
final breakpointFuture = waitForBreakpoint ();
420
424
421
425
await callEvaluate ();
422
426
427
+ print ('called evaluate' );
428
+
423
429
// Should break at `capturedString`.
424
430
await breakpointFuture;
431
+
432
+ print ('waited for breakpoint' );
425
433
final oldCapturedString = 'captured closure gen0' ;
426
434
expect (consoleLogs.contains (oldCapturedString), false );
427
435
// Closure gets evaluated for the first time.
428
436
await resumeAndExpectLog (oldCapturedString);
429
437
438
+ print ('resumed and got log' );
439
+
430
440
final newCapturedString = 'captured closure gen1' ;
431
441
await makeEditAndRecompile (
432
442
mainFile,
433
443
oldCapturedString,
434
444
newCapturedString,
435
445
);
436
446
447
+ print ('made edit again and recompiled' );
448
+
437
449
await hotReloadAndHandlePausePost ([
438
450
(file: mainFile, breakpointMarker: capturedStringMarker, bp: bp),
439
451
]);
440
452
453
+ print ('hot reloaded again and handled pause post' );
454
+
441
455
// Breakpoint should not be hit as it's now deleted. We should also see
442
456
// the old string still as the closure has not been reevaluated.
443
457
await callEvaluateAndExpectLog (oldCapturedString);
458
+
459
+ print ('handled evaluate again and got log' );
444
460
});
445
461
}, timeout: Timeout .factor (2 ));
446
462
0 commit comments