Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ee1056d

Browse filesBrowse files
targosdanielleadams
authored andcommitted
debugger: wait for V8 debugger to be enabled
Refs: #38273 (comment) PR-URL: #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>
1 parent 3c492ba commit ee1056d
Copy full SHA for ee1056d

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎lib/internal/inspector/_inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/_inspect.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ class NodeInspector {
199199
process.once('SIGTERM', exitCodeZero);
200200
process.once('SIGHUP', exitCodeZero);
201201

202-
PromisePrototypeCatch(PromisePrototypeThen(this.run(), () => {
203-
const repl = startRepl();
202+
PromisePrototypeCatch(PromisePrototypeThen(this.run(), async () => {
203+
const repl = await startRepl();
204204
this.repl = repl;
205205
this.repl.on('exit', exitCodeZero);
206206
this.paused = false;
Collapse file

‎lib/internal/inspector/inspect_repl.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/inspect_repl.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,14 +1146,17 @@ function createRepl(inspector) {
11461146
return Runtime.runIfWaitingForDebugger();
11471147
}
11481148

1149-
return function startRepl() {
1149+
return async function startRepl() {
11501150
inspector.client.on('close', () => {
11511151
resetOnStart();
11521152
});
11531153
inspector.client.on('ready', () => {
11541154
initAfterStart();
11551155
});
11561156

1157+
// Init once for the initial connection
1158+
await initAfterStart();
1159+
11571160
const replOptions = {
11581161
prompt: 'debug> ',
11591162
input: inspector.stdin,
@@ -1172,9 +1175,6 @@ function createRepl(inspector) {
11721175
repl.emit('SIGINT');
11731176
});
11741177

1175-
// Init once for the initial connection
1176-
initAfterStart();
1177-
11781178
return repl;
11791179
};
11801180
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.