| 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 bar(x) { | 14 bar(x) { |
| 15 print(x); | 15 print(x); |
| 16 } | 16 } |
| 17 | 17 |
| 18 main() { | 18 main(List<String> arguments) { |
| 19 if (RunScript(testScript)) return; | 19 if (RunScript(testScript, arguments)) return; |
| 20 print("Hello from debuggee"); | 20 print("Hello from debuggee"); |
| 21 var f = bar; | 21 var f = bar; |
| 22 f("closure call"); | 22 f("closure call"); |
| 23 bar(12); | 23 bar(12); |
| 24 var a = new A(); | 24 var a = new A(); |
| 25 for (var i = 0; i < 2; ++i) { | 25 for (var i = 0; i < 2; ++i) { |
| 26 a.foo(i); | 26 a.foo(i); |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 56 StepInto(), | 56 StepInto(), |
| 57 StepInto(), | 57 StepInto(), |
| 58 MatchFrames(["A.<anonymous closure>", "main"]), // In closure function. | 58 MatchFrames(["A.<anonymous closure>", "main"]), // In closure function. |
| 59 Resume(), | 59 Resume(), |
| 60 MatchFrame(0, "main"), // Back in main(). | 60 MatchFrame(0, "main"), // Back in main(). |
| 61 MatchLocals({"i": "1"}), | 61 MatchLocals({"i": "1"}), |
| 62 Resume(), | 62 Resume(), |
| 63 MatchFrames(["A.<anonymous closure>", "main"]), // In closure function. | 63 MatchFrames(["A.<anonymous closure>", "main"]), // In closure function. |
| 64 Resume() | 64 Resume() |
| 65 ]; | 65 ]; |
| OLD | NEW |