| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Test to verify that a breakpoint can be set in code that is not yet | 5 // Test to verify that a breakpoint can be set in code that is not yet |
| 6 // loaded, i.e. in a deferred library. | 6 // loaded, i.e. in a deferred library. |
| 7 // | 7 // |
| 8 // This test forks a second vm process that runs this dart script as | 8 // This test forks a second vm process that runs this dart script as |
| 9 // a debug target. | 9 // a debug target. |
| 10 // Run this test with option --wire to see the json messages sent | 10 // Run this test with option --wire to see the json messages sent |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Expected debugger events and commands. | 32 // Expected debugger events and commands. |
| 33 var testScript = [ | 33 var testScript = [ |
| 34 MatchFrame(0, "main"), // Top frame in trace is function "main". | 34 MatchFrame(0, "main"), // Top frame in trace is function "main". |
| 35 SetBreakpoint(22), // Breakpoint just before call to loadLibrary(). | 35 SetBreakpoint(22), // Breakpoint just before call to loadLibrary(). |
| 36 Resume(), | 36 Resume(), |
| 37 // Set BP in deferred library code before the loadLibrary() call is executed. | 37 // Set BP in deferred library code before the loadLibrary() call is executed. |
| 38 MatchFrame(0, "main"), | 38 MatchFrame(0, "main"), |
| 39 MatchLine(22), | 39 MatchLine(22), |
| 40 MatchLocals({"loaded": "false"}), | 40 MatchLocals({"loaded": "false"}), |
| 41 SetBreakpoint(10, url: "deferred_code_lib.dart"), | 41 SetBreakpoint(10, url: "deferred_code_lib.dart"), |
| 42 // Regression test: we used to have a bug that hung the debugger when |
| 43 // processing latent brakepoints for urls that have no match. |
| 44 // The BP below will not match any loaded file. |
| 45 SetBreakpoint(10, url: "non_existing_file.dart"), |
| 42 Resume(), | 46 Resume(), |
| 43 MatchFrame(0, "stopTheBuck"), // Expect to be stopped in deferred library cod
e. | 47 MatchFrame(0, "stopTheBuck"), // Expect to be stopped in deferred library cod
e. |
| 44 // MatchLine(10), // Line matching only works for the main script. | 48 // MatchLine(10), // Line matching only works for the main script. |
| 45 Resume(), | 49 Resume(), |
| 46 ]; | 50 ]; |
| OLD | NEW |