Skip to content

async stack tracking should not be enabled by default #16180

Closed
@ofrobots

Description

@ofrobots

#13870 adds support for async stack tracking whenever the inspector agent is enabled. Async stack traces are awesome for debugging, but doing this by automatically when the inspector agent is active has a lot of problems:

Some problematic scenarios I can think of:

  • User wants to attach DevTools in order to profile their app. Enabling async stack traces add overhead that was not present before the profiler was attached. The profile would not be representative of the original program.
  • User wants to take a heap profile and uses the inspector module to take the heap profile. Async stack tracking gets enabled as a side-effect – something that the user did not want (the user is not 'single step debugging').
  • User wants to use the inspector module to build a passive, in-production debugger. User is not interested in the overhead of async stack tracking.

Async stack tracking should have been an opt in. Whether or not the inspector agent is enabled conflates too many use-cases.

Apologies that I didn't catch this issue earlier.

/cc @nodejs/v8-inspector @bajtos @nodejs/diagnostics

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions