MCPcopy Index your code
hub / github.com/nodejs/node / testBreakpointOnStart

Function testBreakpointOnStart

test/parallel/test-inspector.js:60–83  ·  view source on GitHub ↗
(session)

Source from the content-addressed store, hash-verified

58}
59
60async function testBreakpointOnStart(session) {
61 console.log('[test]',
62 'Verifying debugger stops on start (--inspect-brk option)');
63 const commands = [
64 { 'method': 'Runtime.enable' },
65 { 'method': 'Debugger.enable' },
66 { 'method': 'Debugger.setPauseOnExceptions',
67 'params': { 'state': 'none' } },
68 { 'method': 'Debugger.setAsyncCallStackDepth',
69 'params': { 'maxDepth': 0 } },
70 { 'method': 'Profiler.enable' },
71 { 'method': 'Profiler.setSamplingInterval',
72 'params': { 'interval': 100 } },
73 { 'method': 'Debugger.setBlackboxPatterns',
74 'params': { 'patterns': [] } },
75 { 'method': 'Runtime.runIfWaitingForDebugger' },
76 ];
77
78 await session.send({ method: 'NodeRuntime.enable' });
79 await session.waitForNotification('NodeRuntime.waitingForDebugger');
80 await session.send(commands);
81 await session.send({ method: 'NodeRuntime.disable' });
82 await session.waitForBreakOnLine(0, session.scriptURL());
83}
84
85async function testBreakpoint(session) {
86 console.log('[test]', 'Setting a breakpoint and verifying it is hit');

Callers 1

runTestFunction · 0.70

Calls 5

waitForNotificationMethod · 0.80
waitForBreakOnLineMethod · 0.80
scriptURLMethod · 0.80
sendMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…