OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import "debug_lib.dart"; | 5 import "debug_lib.dart"; |
6 | 6 |
7 class MyClass { | 7 class MyClass { |
8 operator ==(other) { | 8 operator ==(other) { |
9 print(other); | 9 print(other); |
10 return true; // Breakpoint #3. | 10 return true; // Breakpoint #3. |
11 } | 11 } |
12 } | 12 } |
13 | 13 |
14 main() { | 14 main(List<String> arguments) { |
15 if (RunScript(testScript)) return; | 15 if (RunScript(testScript, arguments)) return; |
16 var a = new MyClass(); | 16 var a = new MyClass(); |
17 var b = null; | 17 var b = null; |
18 var x = a == b; // Breakpoint #1. | 18 var x = a == b; // Breakpoint #1. |
19 print(x); | 19 print(x); |
20 b = 123; | 20 b = 123; |
21 a == b; // Breakpoint #2. | 21 a == b; // Breakpoint #2. |
22 print("after 2"); | 22 print("after 2"); |
23 if (a == null) { // Breakpoint #4. | 23 if (a == null) { // Breakpoint #4. |
24 throw "unreachable"; | 24 throw "unreachable"; |
25 } | 25 } |
(...skipping 24 matching lines...) Expand all Loading... |
50 Resume(), | 50 Resume(), |
51 MatchFrames(["main"]), // At breakpoint #4. | 51 MatchFrames(["main"]), // At breakpoint #4. |
52 StepInto(), | 52 StepInto(), |
53 MatchFrames(["main"]), // After breakpoint #4. | 53 MatchFrames(["main"]), // After breakpoint #4. |
54 Step(), | 54 Step(), |
55 MatchFrames(["main"]), // At null == a. | 55 MatchFrames(["main"]), // At null == a. |
56 StepInto(), | 56 StepInto(), |
57 MatchFrames(["main"]), // After null == a. | 57 MatchFrames(["main"]), // After null == a. |
58 Resume() | 58 Resume() |
59 ]; | 59 ]; |
OLD | NEW |