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 InspectorTest.addScript(` |
| 6 function boo() {} |
| 7 boo(); |
| 8 function foo() {} |
| 9 //# sourceURL=foo.js`); |
| 10 |
| 11 Protocol.Debugger.onPaused((message) => { |
| 12 InspectorTest.logMessage(message.params.callFrames[0].functionName || "(top)")
; |
| 13 Protocol.Debugger.stepInto(); |
| 14 }); |
| 15 var scriptId; |
| 16 Protocol.Debugger.onScriptParsed(message => { |
| 17 if (message.params.url === 'foo.js') |
| 18 scriptId = message.params.scriptId; |
| 19 }); |
| 20 Protocol.Debugger.enable() |
| 21 .then(() => Protocol.Debugger.getPossibleBreakpoints({start: {scriptId, lineNu
mber:0,columnNumber:0}})) |
| 22 .then(() => InspectorTest.log('-- call boo:')) |
| 23 .then(() => Protocol.Runtime.evaluate({ expression: 'debugger; boo();'})) |
| 24 .then(() => InspectorTest.log('-- call foo:')) |
| 25 .then(() => Protocol.Runtime.evaluate({ expression: 'debugger; foo();'})) |
| 26 .then(InspectorTest.completeTest); |
OLD | NEW |