Skip to content

Commit

Permalink
feat: allow repl pause on exception state to be set from env
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
iloveitaly committed Jun 11, 2023
1 parent 4ee8ef2 commit 6144954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/debugger/inspect_repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function createRepl(inspector) {
const watchedExpressions = [];
const knownBreakpoints = [];
let heapSnapshotPromise = null;
let pauseOnExceptionState = 'none';
let pauseOnExceptionState = process.env.NODE_INSPECT_PAUSE_ON_EXCEPTION_STATE || 'none';
let lastCommand;

// Things we need to reset when the app restarts
Expand Down

0 comments on commit 6144954

Please sign in to comment.