Skip to content

Missing async callstacks on setTimeout #11370

Description

@roblourens

When debugging Chrome, you can have code like

setTimeout(() => {
  console.log('timeout');
})

and if you pause in the timeout handler and enable async callstacks in Chrome DevTools, you'll see the callstack that lead to calling setTimeout:

image

But if I debug the same code in Node using the inspector protocol, I don't see async callstacks in this case. But I do see async callstacks for Promises. So it must have something to do with Node's timer implementation. Is there any way that it could surface async callstacks too?

Activity

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

Metadata

Metadata

Assignees

Labels

diag-agendaIssues and PRs to discuss during Diagnostics Working Group meetings.feature requestIssues requesting new Node.js features.inspectorIssues and PRs related to the V8 inspector protocol.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions