OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Debug = debug.Debug; |
| 6 |
| 7 let n = 0; |
| 8 function listener(event, exec_state, event_data, data) { |
| 9 if (event == Debug.DebugEvent.Break) { |
| 10 if (n++ == 0) { |
| 11 Debug.setBreakPoint(main, 0, 0); |
| 12 } |
| 13 } |
| 14 } |
| 15 |
| 16 Debug.setListener(listener); |
| 17 |
| 18 function main() { |
| 19 function* boo() { |
| 20 debugger; |
| 21 yield; |
| 22 } |
| 23 |
| 24 var gen = boo(); |
| 25 gen.next(); |
| 26 gen.next(); |
| 27 } |
| 28 |
| 29 main(); |
OLD | NEW |