(session)
| 19 | } |
| 20 | |
| 21 | async function testBreakpointOnStart(session) { |
| 22 | console.log('[test]', |
| 23 | 'Verifying debugger stops on start (--inspect-brk option)'); |
| 24 | const commands = [ |
| 25 | { 'method': 'Runtime.enable' }, |
| 26 | { 'method': 'Debugger.enable' }, |
| 27 | { 'method': 'Debugger.setPauseOnExceptions', |
| 28 | 'params': { 'state': 'none' } }, |
| 29 | { 'method': 'Debugger.setAsyncCallStackDepth', |
| 30 | 'params': { 'maxDepth': 0 } }, |
| 31 | { 'method': 'Profiler.enable' }, |
| 32 | { 'method': 'Profiler.setSamplingInterval', |
| 33 | 'params': { 'interval': 100 } }, |
| 34 | { 'method': 'Debugger.setBlackboxPatterns', |
| 35 | 'params': { 'patterns': [] } }, |
| 36 | { 'method': 'Runtime.runIfWaitingForDebugger' }, |
| 37 | ]; |
| 38 | |
| 39 | await session.send({ method: 'NodeRuntime.enable' }); |
| 40 | await session.waitForNotification('NodeRuntime.waitingForDebugger'); |
| 41 | await session.send(commands); |
| 42 | await session.send({ method: 'NodeRuntime.disable' }); |
| 43 | await session.waitForBreakOnLine( |
| 44 | 0, UrlResolve(session.scriptURL().toString(), 'message.mjs')); |
| 45 | } |
| 46 | |
| 47 | async function testBreakpoint(session) { |
| 48 | console.log('[test]', 'Setting a breakpoint and verifying it is hit'); |
no test coverage detected
searching dependent graphs…