waitUntilPaused method
Returns a future that completes once this isolate is paused.
This works whether the isolate is already paused or has yet to be paused. Note that if any other code (other VM service clients or other isolates) unpauses the isolate, it may be unpaused by the time the returned future fires.
Implementation
Future waitUntilPaused() {
return _scope.getInState(_scope.streams.debug, () async {
return (await load()).isPaused;
}, (json) {
return json["kind"] == "PauseStart" ||
json["kind"] == "PauseException" ||
json["kind"] == "PauseExit" ||
json["kind"] == "PauseInterrupted" ||
json["kind"] == "PauseBreakpoint";
});
}