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

Function testBreakpointOnStart

test/parallel/test-inspector-exception.js:13–36  ·  view source on GitHub ↗
(session)

Source from the content-addressed store, hash-verified

11const script = fixtures.path('throws_error.js');
12
13async function testBreakpointOnStart(session) {
14 console.log('[test]',
15 'Verifying debugger stops on start (--inspect-brk option)');
16 const commands = [
17 { 'method': 'Runtime.enable' },
18 { 'method': 'Debugger.enable' },
19 { 'method': 'Debugger.setPauseOnExceptions',
20 'params': { 'state': 'none' } },
21 { 'method': 'Debugger.setAsyncCallStackDepth',
22 'params': { 'maxDepth': 0 } },
23 { 'method': 'Profiler.enable' },
24 { 'method': 'Profiler.setSamplingInterval',
25 'params': { 'interval': 100 } },
26 { 'method': 'Debugger.setBlackboxPatterns',
27 'params': { 'patterns': [] } },
28 { 'method': 'Runtime.runIfWaitingForDebugger' },
29 ];
30
31 await session.send({ method: 'NodeRuntime.enable' });
32 await session.waitForNotification('NodeRuntime.waitingForDebugger');
33 await session.send(commands);
34 await session.send({ method: 'NodeRuntime.disable' });
35 await session.waitForBreakOnLine(21, pathToFileURL(script).toString());
36}
37
38
39async function runTest() {

Callers 1

runTestFunction · 0.70

Calls 6

waitForNotificationMethod · 0.80
waitForBreakOnLineMethod · 0.80
sendMethod · 0.65
pathToFileURLFunction · 0.50
logMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…