Skip to content

Debugging v8.5 - always pauses in async_hooks.js on promise rejection #15464

Description

@roblourens

Have this code:

console.log('before');
Promise.reject(new Error('error'))

When I debug it in Chrome Devtools or VS Code, even when it's set to not break on exceptions, it pauses on function emitDestroyScript(asyncId) {... in async_hook.js after the promise is rejected.

The stack where it pauses is

emitDestroyScript (async_hooks.js:436)
_tickCallback (next_tick.js:175)
Module.runMain (module.js:667)
startup (bootstrap_node.js:201)
(anonymous function) (bootstrap_node.js:626)

The reason on the Debugger.paused message is "other".

Metadata

Metadata

Assignees

No one assigned

    Labels

    async_hooksIssues and PRs related to the async hooks subsystem.confirmed-bugIssues and PRs for confirmed bugs.inspectorIssues and PRs related to the V8 inspector protocol.promisesIssues and PRs related to ECMAScript promises.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions