Skip to content

Purpose of double Debugger.setPauseOnExceptions #41795

Description

@Delapouite

Hi

During the init phase: https://github.com/nodejs/node-inspect/blob/master/lib/internal/inspect_repl.js#L1041

  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);
  }

What's the purpose of doing Debugger.setPauseOnExceptions twice?

Debugger.setPauseOnExceptions({ state: 'none' }),
Debugger.setPauseOnExceptions({ state: pauseOnExceptionState }),

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuggerIssues and PRs related to the Node.js command-line debugger.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions