mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
debugger: wait for V8 debugger to be enabled
Refs: https://github.com/nodejs/node/pull/38273#issuecomment-848438189 PR-URL: https://github.com/nodejs/node/pull/38811 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
3c492baa51
commit
ee1056da60
2 files changed
+6
-6
No files matched your search
@@ -199,8 +199,8 @@ class NodeInspector {
|
||||
process.once('SIGTERM', exitCodeZero);
|
||||
process.once('SIGHUP', exitCodeZero);
|
||||
|
||||
PromisePrototypeCatch(PromisePrototypeThen(this.run(), () => {
|
||||
const repl = startRepl();
|
||||
PromisePrototypeCatch(PromisePrototypeThen(this.run(), async () => {
|
||||
const repl = await startRepl();
|
||||
this.repl = repl;
|
||||
this.repl.on('exit', exitCodeZero);
|
||||
this.paused = false;
|
||||
|
||||
@@ -1146,7 +1146,7 @@ function createRepl(inspector) {
|
||||
return Runtime.runIfWaitingForDebugger();
|
||||
}
|
||||
|
||||
return function startRepl() {
|
||||
return async function startRepl() {
|
||||
inspector.client.on('close', () => {
|
||||
resetOnStart();
|
||||
});
|
||||
@@ -1154,6 +1154,9 @@ function createRepl(inspector) {
|
||||
initAfterStart();
|
||||
});
|
||||
|
||||
// Init once for the initial connection
|
||||
await initAfterStart();
|
||||
|
||||
const replOptions = {
|
||||
prompt: 'debug> ',
|
||||
input: inspector.stdin,
|
||||
@@ -1172,9 +1175,6 @@ function createRepl(inspector) {
|
||||
repl.emit('SIGINT');
|
||||
});
|
||||
|
||||
// Init once for the initial connection
|
||||
initAfterStart();
|
||||
|
||||
return repl;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user