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

Method run

lib/internal/debugger/inspect_probe.js:977–1010  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

975 }
976
977 async run() {
978 try {
979 const { childArgv, host, port, skipPortPreflight } = this.options;
980 const { 0: child, 1: actualPort, 2: actualHost } =
981 await launchChildProcess(childArgv,
982 host,
983 port,
984 this.onChildOutput,
985 { skipPortPreflight });
986 this.child = child;
987 // On Debugger.enable, V8 emits Debugger.scriptParsed for all existing scripts.
988 // Attach the listener early to make sure we don't miss any events.
989 this.attachListeners();
990
991 await this.client.connect(actualPort, actualHost);
992 this.connected = true;
993
994 try {
995 await this.callCdp('Runtime.enable');
996 await this.callCdp('Debugger.enable');
997 await this.bindBreakpoints();
998 this.started = true;
999 this.startTimeout();
1000 await this.callCdp('Runtime.runIfWaitingForDebugger');
1001 } catch (err) {
1002 if (err !== kInspectorFailedSentinel) { throw err; }
1003 }
1004
1005 const state = await this.completionPromise;
1006 return this.buildReport(state);
1007 } finally {
1008 await this.cleanup();
1009 }
1010 }
1011}
1012
1013async function runProbeMode(stdout, probeOptions) {

Callers 1

runProbeModeFunction · 0.95

Calls 8

attachListenersMethod · 0.95
callCdpMethod · 0.95
bindBreakpointsMethod · 0.95
startTimeoutMethod · 0.95
buildReportMethod · 0.95
cleanupMethod · 0.95
launchChildProcessFunction · 0.70
connectMethod · 0.65

Tested by

no test coverage detected