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

Function testBreakpointOnStart

test/parallel/test-inspector-debug-brk-flag.js:9–30  ·  view source on GitHub ↗
(session)

Source from the content-addressed store, hash-verified

7const { NodeInstance } = require('../common/inspector-helper.js');
8
9async function testBreakpointOnStart(session) {
10 const commands = [
11 { 'method': 'Runtime.enable' },
12 { 'method': 'Debugger.enable' },
13 { 'method': 'Debugger.setPauseOnExceptions',
14 'params': { 'state': 'none' } },
15 { 'method': 'Debugger.setAsyncCallStackDepth',
16 'params': { 'maxDepth': 0 } },
17 { 'method': 'Profiler.enable' },
18 { 'method': 'Profiler.setSamplingInterval',
19 'params': { 'interval': 100 } },
20 { 'method': 'Debugger.setBlackboxPatterns',
21 'params': { 'patterns': [] } },
22 { 'method': 'Runtime.runIfWaitingForDebugger' },
23 ];
24
25 await session.send({ method: 'NodeRuntime.enable' });
26 await session.waitForNotification('NodeRuntime.waitingForDebugger');
27 await session.send(commands);
28 await session.send({ method: 'NodeRuntime.disable' });
29 await session.waitForBreakOnLine(0, session.scriptURL());
30}
31
32async function runTests() {
33 const child = new NodeInstance(['--inspect-brk=0']);

Callers 1

runTestsFunction · 0.70

Calls 4

waitForNotificationMethod · 0.80
waitForBreakOnLineMethod · 0.80
scriptURLMethod · 0.80
sendMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…