Skip to content

feat: test timeout diagnostics with stack traces and deadlock detection #4888

@thomhurst

Description

@thomhurst

Description

TimeoutAttribute exists but provides no diagnostics when a test times out — no stack traces, no deadlock detection, no thread state reporting.

Why

Timeout errors are extremely hard to debug. Users can't tell if it's a real hang vs. a slow test, and have no way to diagnose deadlocks in async code.

Proposed Approach

  • Capture stack trace at the moment of timeout
  • Report async state (task chains, waiting handles)
  • Report thread pool state and lock contention info
  • Add --timeout-diagnostics mode for detailed capture
  • Generate timeout diagnostics report (HTML/JSON)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions