diff --git a/lib/internal/inspector/inspect_repl.js b/lib/internal/inspector/inspect_repl.js index 57a76b3b7f0dfb..32ee1c3f8c31ba 100644 --- a/lib/internal/inspector/inspect_repl.js +++ b/lib/internal/inspector/inspect_repl.js @@ -1062,19 +1062,16 @@ function createRepl(inspector) { } function initAfterStart() { - const setupTasks = [ - Runtime.enable(), - Profiler.enable(), - Profiler.setSamplingInterval({ interval: 100 }), - Debugger.enable(), - Debugger.setPauseOnExceptions({ state: 'none' }), - Debugger.setAsyncCallStackDepth({ maxDepth: 0 }), - Debugger.setBlackboxPatterns({ patterns: [] }), - Debugger.setPauseOnExceptions({ state: pauseOnExceptionState }), - restoreBreakpoints(), - Runtime.runIfWaitingForDebugger(), - ]; - return Promise.all(setupTasks); + return Runtime.enable() + .then(() => Profiler.enable()) + .then(() => Profiler.setSamplingInterval({ interval: 100 })) + .then(() => Debugger.enable()) + .then(() => Debugger.setPauseOnExceptions({ state: 'none' })) + .then(() => Debugger.setAsyncCallStackDepth({ maxDepth: 0 })) + .then(() => Debugger.setBlackboxPatterns({ patterns: [] })) + .then(() => Debugger.setPauseOnExceptions({ state: pauseOnExceptionState })) + .then(() => restoreBreakpoints()) + .then(() => Runtime.runIfWaitingForDebugger()) } return function startRepl() {