Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: runtime/observatory/tests/service/parameters_in_scope_at_entry_test.dart

Issue 1393453004: Ensure the debugger considers parameters to be in scope at the method entry debug step. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
5
6 import 'package:observatory/service_io.dart';
7 import 'test_helper.dart';
8 import 'dart:developer';
9 import 'package:unittest/unittest.dart';
10
11 foo(param) {
12 return param;
13 }
14
15 fooClosure() {
16 theClosureFunction(param) {
17 return param;
18 }
19 return theClosureFunction;
20 }
21
22 testMain() {
23 debugger();
24 foo("in-scope"); // Line 24
25
26 var f = fooClosure();
27 debugger();
28 f("in-scope"); // Line 28
29 }
30
31 var tests = [
32 hasStoppedAtBreakpoint,
33 stoppedAtLine(24),
34 (isolate) => isolate.stepInto(),
35 hasStoppedAtBreakpoint,
36 (isolate) async {
37 var stack = await isolate.getStack();
38 Frame top = stack['frames'][0];
39 print(top);
40 expect(top.function.name, equals("foo"));
41 print(top.variables);
42 expect(top.variables.length, equals(1));
43 var param = top.variables[0];
44 expect(param['name'], equals("param"));
45 expect(param['value'].valueAsString, equals("in-scope"));
46 },
47 resumeIsolate,
48
49 hasStoppedAtBreakpoint,
50 stoppedAtLine(28),
51 (isolate) => isolate.stepInto(),
52 hasStoppedAtBreakpoint,
53 (isolate) async {
54 var stack = await isolate.getStack();
55 Frame top = stack['frames'][0];
56 print(top);
57 expect(top.function.name, equals("theClosureFunction"));
58 print(top.variables);
59 expect(top.variables.length, equals(1));
60 var param = top.variables[0];
61 expect(param['name'], equals("param"));
62 expect(param['value'].valueAsString, equals("in-scope"));
63 },
64 resumeIsolate,
65 ];
66
67 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698