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

Method run

lib/internal/debugger/inspect.js:155–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153 }
154
155 async run() {
156 this.killChild();
157
158 const { 0: child, 1: port, 2: host } = await this._runScript();
159 this.child = child;
160
161 this.print(`connecting to ${host}:${port} ..`, false);
162 for (let attempt = 0; attempt < 5; attempt++) {
163 debuglog('connection attempt #%d', attempt);
164 this.stdout.write('.');
165 try {
166 await this.client.connect(port, host);
167 debuglog('connection established');
168 this.stdout.write(' ok\n');
169 return;
170 } catch (error) {
171 debuglog('connect failed', error);
172 await pSetTimeout(1000);
173 }
174 }
175 this.stdout.write(' failed to connect, please retry\n');
176 process.exit(kGenericUserError);
177 }
178
179 clearLine() {
180 if (this.stdout.isTTY) {

Callers 2

constructorMethod · 0.95
runAndInitFunction · 0.45

Calls 6

killChildMethod · 0.95
printMethod · 0.95
connectMethod · 0.65
debuglogFunction · 0.50
writeMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected