Skip to content

Commit 6144954

Browse files
committed
feat: allow repl pause on exception state to be set from env
Right now, it's not possible to configure the debugger to pause on uncaught exceptions without manually configuring the pause state on each run. This change would allow the pause state to be configured via a shell env variable to allow for faster CLI-based node debugging.
1 parent 4ee8ef2 commit 6144954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/debugger/inspect_repl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ function createRepl(inspector) {
370370
const watchedExpressions = [];
371371
const knownBreakpoints = [];
372372
let heapSnapshotPromise = null;
373-
let pauseOnExceptionState = 'none';
373+
let pauseOnExceptionState = process.env.NODE_INSPECT_PAUSE_ON_EXCEPTION_STATE || 'none';
374374
let lastCommand;
375375

376376
// Things we need to reset when the app restarts

0 commit comments

Comments
 (0)