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

Method suspendReplWhile

lib/internal/debugger/inspect.js:126–145  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

124 }
125
126 suspendReplWhile(fn) {
127 if (this.repl) {
128 this.repl.pause();
129 }
130 this.stdin.pause();
131 this.paused = true;
132 return (async () => {
133 try {
134 await fn();
135 this.paused = false;
136 if (this.repl) {
137 this.repl.resume();
138 this.repl.displayPrompt();
139 }
140 this.stdin.resume();
141 } catch (error) {
142 process.nextTick(() => { throw error; });
143 }
144 })();
145 }
146
147 killChild() {
148 this.client.reset();

Callers 1

createReplFunction · 0.80

Calls 4

displayPromptMethod · 0.80
pauseMethod · 0.65
resumeMethod · 0.65
fnFunction · 0.50

Tested by

no test coverage detected