-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Open
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocolv8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
Version
20.3.1
Platform
Darwin mbp.peet.io 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64 x86_64
Subsystem
inspector
What steps will reproduce the bug?
- Start a program containing
throw new Error('foo');
in an ES module - Attach a debugger, like devtools or VS Code's debugger, and enable "pause on uncaught exceptions"
- Run the program
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior? Why is that the expected behavior?
The runtime should pause on the throw
line
What do you see instead?
The runtime does not pause and the program exits
Additional information
First reported in microsoft/vscode-js-debug#1861
Guessing this is because module evaluation is in a try/catch. Wonder if there's any machinery that can be used to mark containing exceptions as uncaught
node/lib/internal/modules/esm/module_job.js
Lines 217 to 219 in 0a0b8df
try { | |
await this.module.evaluate(timeout, breakOnSigint); | |
} catch (e) { |
bn-l, elHamil, WillieHabi, twilson90, cirosantilli and 4 moretwilson90
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocolv8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.