MCPcopy Create free account
hub / github.com/nodejs/node / beChild

Function beChild

test/sequential/test-inspector-open-dispose.mjs:62–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62async function beChild() {
63 const inspector = await import('node:inspector');
64 let inspectorDisposer;
65 process.send({ cmd: 'started' });
66
67 process.on('message', (msg) => {
68 if (msg.cmd === 'open') {
69 inspectorDisposer = inspector.open(0, false, undefined);
70 }
71 if (msg.cmd === 'dispose') {
72 inspectorDisposer[Symbol.dispose]();
73 }
74 process.send({ cmd: 'url', url: inspector.url() });
75 });
76}

Callers 1

Calls 4

sendMethod · 0.65
openMethod · 0.65
urlMethod · 0.65
onMethod · 0.45

Tested by

no test coverage detected