blob: c2d7029424f852a555a370dfd69dd5f194ca6884 [file] [log] [blame]
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--verbose_debug
import 'dart:developer';
import 'package:observatory/service_io.dart';
import 'service_test_common.dart';
import 'test_helper.dart';
const int LINE_A = 21;
const int LINE_B = 16;
bar() {
print('bar');
}
testMain() {
debugger();
bar();
print("Done");
}
var tests = <IsolateTest>[
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
// Add breakpoint
setBreakpointAtLine(LINE_B),
// Evaluate 'bar()'
(Isolate isolate) async {
final lib = isolate.rootLibrary;
await lib.evaluate('bar()', disableBreakpoints: true);
},
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
resumeIsolate,
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_B),
resumeIsolate,
];
main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);