Repository navigation
skipFiles does not suppress "uncaught" exceptions in web streams #53789
Description
Activity
Related: #51093 (the debugger falsely believes promise rejections in web streams are unhandled).
- addeddebuggerIssues and PRs related to the Node.js command-line debugger.Issues and PRs related to the Node.js command-line debugger.
on Jul 9, 2024 Yes,
skipFilesis controlled by VSCode. And the Chrome debugger supports a similar "ignore list" feature. Adding the pattern^node:internaldoes not seem to suppress the debugger. Even adding the pattern.*does not seem to suppress the debugger from breaking here!If there's a more correct way to suppress these exceptions, please let me know!
It sounds to me like this is a VSCode bug, and not a Node.js one, but again, I may be mistaken.
I'm not sure what the pattern is supposedly matching against when the debugger is deciding whether to pause at a breakpoint - the stack traces in play (shown above) seem to match ignore-listed scripts, so I'd expect there not to be a breakpoint hit.
It sounds to me like this is a VSCode bug, and not a Node.js one, but again, I may be mistaken.
Might be, but if so, then Chrome has the same behavior. I can't tell if there's any workaround to #53732 that allows trapping uncaught exceptions without making async code to "nuisance trip" the debugger on an eventually-handled rejection.
@nodejs/v8 - is this a V8 debugger issue, or a VSCode/Chrome issue?
The promise is rejected at
writableStreamRejectCloseAndClosedPromiseIfNeededand is then immediately handled to prevent it from having an unhandled rejection which is why Node.js doesn't report an unhandled rejection here:stream[kIsClosedPromise].reject(stream[kState]?.storedError); setPromiseHandled(stream[kIsClosedPromise].promise);
The other instances I can trigger this are similar:
stream[kIsClosedPromise].reject(error); setPromiseHandled(stream[kIsClosedPromise].promise);
This indeed seems overly eager (and incorrect) on V8's side. Additionally skipFiles not working seems like a VSCode bug.
I'll open a PR with a workaround from our side until it's addressed there. Those aren't real errors.
Reacted by Dan Rose- added a commit that references this issue
on Jul 12, 2024 11 remaining items
This isn't closed, the fact skipFiles does not suppress exceptions in core and that it's still a caught exception is a bug and we should track it since it affects our users even if we can't fix it.
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on May 1, 2026 not stale
- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on May 2, 2026 github-actions commented
on Jul 31, 2026 on Jul 31, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Jul 31, 2026 what progress has been made on this issue?
- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Aug 1, 2026
Version
22.4.1
Platform
Subsystem
No response
What steps will reproduce the bug?
Run this code in the VSCode debugger with
"skipFiles":["<node_internals>/**"]in the launch configuration.How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
It is expected that the debugger won't trip. This promise rejection is entirely created and handled within node's internals and should be suppressed by the VSCode's
skipFilesfilter.What do you see instead?
The debugger breaks when the promise is rejected.
The trace (given by
console.trace) when it is rejected looks like:The stack on the error object is:
Additional information
No response