File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,8 @@ class NodeInspector {
203203 process . once ( 'SIGTERM' , exitCodeZero ) ;
204204 process . once ( 'SIGHUP' , exitCodeZero ) ;
205205
206- PromisePrototypeCatch ( PromisePrototypeThen ( this . run ( ) , ( ) => {
207- const repl = startRepl ( ) ;
206+ PromisePrototypeCatch ( PromisePrototypeThen ( this . run ( ) , async ( ) => {
207+ const repl = await startRepl ( ) ;
208208 this . repl = repl ;
209209 this . repl . on ( 'exit' , exitCodeZero ) ;
210210 this . paused = false ;
Original file line number Diff line number Diff line change @@ -1077,14 +1077,17 @@ function createRepl(inspector) {
10771077 . then ( ( ) => Runtime . runIfWaitingForDebugger ( ) ) ;
10781078 }
10791079
1080- return function startRepl ( ) {
1080+ return async function startRepl ( ) {
10811081 inspector . client . on ( 'close' , ( ) => {
10821082 resetOnStart ( ) ;
10831083 } ) ;
10841084 inspector . client . on ( 'ready' , ( ) => {
10851085 initAfterStart ( ) ;
10861086 } ) ;
10871087
1088+ // Init once for the initial connection
1089+ await initAfterStart ( ) ;
1090+
10881091 const replOptions = {
10891092 prompt : 'debug> ' ,
10901093 input : inspector . stdin ,
@@ -1103,9 +1106,6 @@ function createRepl(inspector) {
11031106 repl . emit ( 'SIGINT' ) ;
11041107 } ) ;
11051108
1106- // Init once for the initial connection
1107- initAfterStart ( ) ;
1108-
11091109 return repl ;
11101110 } ;
11111111}
You can’t perform that action at this time.
0 commit comments