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

Function setupSession

test/parallel/test-inspector-multisession-ws.js:25–44  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

23`;
24
25async function setupSession(node) {
26 const session = await node.connectInspectorSession();
27 await session.send({ method: 'NodeRuntime.enable' });
28 await session.waitForNotification('NodeRuntime.waitingForDebugger');
29 await session.send([
30 { 'method': 'Runtime.enable' },
31 { 'method': 'Debugger.enable' },
32 { 'method': 'Debugger.setPauseOnExceptions',
33 'params': { 'state': 'none' } },
34 { 'method': 'Debugger.setAsyncCallStackDepth',
35 'params': { 'maxDepth': 0 } },
36 { 'method': 'Profiler.enable' },
37 { 'method': 'Profiler.setSamplingInterval',
38 'params': { 'interval': 100 } },
39 { 'method': 'Debugger.setBlackboxPatterns',
40 'params': { 'patterns': [] } },
41 ]);
42
43 return session;
44}
45
46async function testSuspend(sessionA, sessionB) {
47 console.log('[test]', 'Breaking in code and verifying events are fired');

Callers 1

runTestFunction · 0.85

Calls 3

waitForNotificationMethod · 0.80
sendMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…