(session)
| 12 | const script = fixtures.path('inspector-global-function.mjs'); |
| 13 | |
| 14 | async function setupDebugger(session) { |
| 15 | console.log('[test]', 'Setting up a debugger'); |
| 16 | const commands = [ |
| 17 | { 'method': 'Runtime.enable' }, |
| 18 | { 'method': 'Debugger.enable' }, |
| 19 | { 'method': 'Debugger.setAsyncCallStackDepth', |
| 20 | 'params': { 'maxDepth': 0 } }, |
| 21 | { 'method': 'Runtime.runIfWaitingForDebugger' }, |
| 22 | ]; |
| 23 | await session.send({ method: 'NodeRuntime.enable' }); |
| 24 | await session.waitForNotification('NodeRuntime.waitingForDebugger'); |
| 25 | await session.send(commands); |
| 26 | await session.send({ method: 'NodeRuntime.disable' }); |
| 27 | |
| 28 | await session.waitForNotification('Debugger.paused', 'Initial pause'); |
| 29 | |
| 30 | // NOTE(mmarchini): We wait for the second console.log to ensure we loaded |
| 31 | // every internal module before pausing. See |
| 32 | // https://bugs.chromium.org/p/chromium/issues/detail?id=1246905 |
| 33 | const waitForReady = session.waitForConsoleOutput('log', 'Ready!'); |
| 34 | session.send({ 'method': 'Debugger.resume' }); |
| 35 | await waitForReady; |
| 36 | } |
| 37 | |
| 38 | async function breakOnLine(session) { |
| 39 | console.log('[test]', 'Breaking in the code'); |
no test coverage detected
searching dependent graphs…