Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## 11.1.2-dev

- Return empty library from `ChromeProxyService.getObject` for
libraries present in medatata but not lodaded at runtime.
libraries present in medatata but not loaded at runtime.
- Log failures to load kernel during expression evaluation.
- Show lowered final fields using their original dart names.
- Limit simultaneous connections to asset server to prevent broken sockets.
- Fix hangs in hot restart.

## 11.1.1

Expand Down
22 changes: 17 additions & 5 deletions dwds/lib/src/dwds_vm_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,27 @@ class DwdsVmClient {

Future<void> _disableBreakpointsAndResume(
VmService client, ChromeProxyService chromeProxyService) async {
_logger.info('Attempting to disabling breakpoints and resume the isolate');
_logger.info('Attempting to disable breakpoints and resume the isolate');
var vm = await client.getVM();
if (vm.isolates.isEmpty) throw StateError('No active isolate to resume.');
var isolateRef = vm.isolates.first;

// Pause the app to prevent it from hitting a breakpoint
// during hot restart and stalling hot restart execution.
// Then wait for the app to pause or to hit a breakpoint.
var debug = chromeProxyService.onEvent('Debug').firstWhere((event) =>
event.kind == EventKind.kPauseInterrupted ||
event.kind == EventKind.kPauseBreakpoint);

await client.pause(isolateRef.id);

var isolate = await client.getIsolate(isolateRef.id);
await chromeProxyService.disableBreakpoints();
if (isolate.pauseEvent.kind == EventKind.kPauseInterrupted ||
isolate.pauseEvent.kind == EventKind.kPauseBreakpoint) {
await client.resume(isolate.id);
if (isolate.pauseEvent.kind != EventKind.kPauseInterrupted &&
isolate.pauseEvent.kind != EventKind.kPauseBreakpoint) {
await debug;
}

await chromeProxyService.disableBreakpoints();
await client.resume(isolateRef.id);
_logger.info('Successfully disabled breakpoints and resumed the isolate');
}