| 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 // This test forks a second vm process that runs this dart script as | 5 // This test forks a second vm process that runs this dart script as |
| 6 // a debug target. | 6 // a debug target. |
| 7 // Run this test with option --wire to see the json messages sent | 7 // Run this test with option --wire to see the json messages sent |
| 8 // between the processes. | 8 // between the processes. |
| 9 // Run this test with option --verbose to see the stdout and stderr output | 9 // Run this test with option --verbose to see the stdout and stderr output |
| 10 // of the debug target process. | 10 // of the debug target process. |
| 11 | 11 |
| 12 import "debug_lib.dart"; | 12 import "debug_lib.dart"; |
| 13 | 13 |
| 14 main() { | 14 main(List<String> arguments) { |
| 15 if (RunScript(testScript)) return; | 15 if (RunScript(testScript, arguments)) return; |
| 16 print("Hello from debuggee"); | 16 print("Hello from debuggee"); |
| 17 var a = new A(); | 17 var a = new A(); |
| 18 for (var i = 0; i < 2; ++i) { | 18 for (var i = 0; i < 2; ++i) { |
| 19 a.foo(i); | 19 a.foo(i); |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 | 22 |
| 23 class A { | 23 class A { |
| 24 noSuchMethod(m) { | 24 noSuchMethod(m) { |
| 25 print(m.positionalArguments[0]); | 25 print(m.positionalArguments[0]); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 39 StepOut(), | 39 StepOut(), |
| 40 MatchFrame(0, "main"), // Back in main. | 40 MatchFrame(0, "main"), // Back in main. |
| 41 Resume(), | 41 Resume(), |
| 42 MatchFrame(0, "main"), // Still in main back at a.foo(i). | 42 MatchFrame(0, "main"), // Still in main back at a.foo(i). |
| 43 MatchLocals({"i": "1"}), | 43 MatchLocals({"i": "1"}), |
| 44 StepInto(), | 44 StepInto(), |
| 45 StepInto(), | 45 StepInto(), |
| 46 MatchFrames(["A.noSuchMethod", "main"]), // Second invocation. | 46 MatchFrames(["A.noSuchMethod", "main"]), // Second invocation. |
| 47 Resume() | 47 Resume() |
| 48 ]; | 48 ]; |
| OLD | NEW |