Skip to content

Add crash report support to the CrashDump extension#8191

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/feature-generate-crash-report
Draft

Add crash report support to the CrashDump extension#8191
Copilot wants to merge 2 commits into
mainfrom
copilot/feature-generate-crash-report

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

New Feature

What does this feature do?

The CrashDump extension can now ask the .NET runtime to generate JSON crash reports in addition to, or instead of, a dump. This makes crash triage lighter-weight in CI, especially for environments where full dump collection is expensive or impractical.

Why is this feature needed?

DOTNET_EnableCrashReport and DOTNET_EnableCrashReportOnly are already available in the runtime, but the MTP CrashDump extension only exposed dump generation. Surfacing crash reports gives a cheaper diagnostic path and improves crash investigation on machines where developers cannot inspect native dumps directly.

Implementation details

  • CLI surface

    • Added --crashreport to generate a crash report alongside --crashdump
    • Added --crashreport-only to request only the JSON crash report
    • Added validation for invalid combinations:
      • --crashreport requires --crashdump
      • --crashreport-only cannot be combined with other crash options
  • Runtime configuration

    • Wired the new options to the runtime environment variables:
      • DOTNET_EnableCrashReport
      • DOTNET_EnableCrashReportOnly
    • Kept DbgEnableMiniDump enabled for --crashreport-only, since the runtime still requires createdump activation to emit the report
  • Artifacts and user-visible behavior

    • Added crash report artifact discovery/publishing for *.crashreport.json
    • Updated crash messages to distinguish:
      • dump only
      • report only
      • dump + report
    • Updated help text and package docs to describe the new options
  • Coverage

    • Extended unit coverage for command-line validation
    • Added acceptance coverage for:
      • dump + crash report
      • crash report only
      • invalid --crashreport usage
    • Updated help/info expectations for the new CLI options

Example

# Generate a dump and a JSON crash report
dotnet test -- --crashdump --crashreport

# Generate only a JSON crash report
dotnet test -- --crashreport-only

Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 17:02
Copilot AI review requested due to automatic review settings May 13, 2026 17:02
Copilot AI linked an issue May 13, 2026 that may be closed by this pull request
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 17:23
Copilot AI changed the title [WIP] Add feature to generate crash report for .NET 6.0 and 7.0 Add crash report support to the CrashDump extension May 13, 2026
Copilot AI requested a review from Evangelink May 13, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Generate crash report

2 participants