Skip to content

[Diagnostics] Enable .NET Runtime crash reporting before signal chaining#11291

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/enable-crash-reporting-order
Draft

[Diagnostics] Enable .NET Runtime crash reporting before signal chaining#11291
Copilot wants to merge 2 commits intomainfrom
copilot/enable-crash-reporting-order

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

Android registers signal handlers before .NET's runtime, causing Android to kill the process before .NET crash reporting can run. The System.Runtime.CrashReportBeforeSignalChaining property (dotnet/runtime#123735) allows flipping this order.

Changes

  • Microsoft.Android.Sdk.RuntimeConfig.targets: Add AndroidEnableDiagnosticCrashReporting MSBuild property (default true) and wire it to System.Runtime.CrashReportBeforeSignalChaining via RuntimeHostConfigurationOption
  • build-properties.md: Document the new property

With this enabled, managed callstacks are logged and a crash report JSON is written to disk on crash (dotnet/runtime#123824, dotnet/runtime#126916).

Opt out if needed:

<PropertyGroup>
  <AndroidEnableDiagnosticCrashReporting>false</AndroidEnableDiagnosticCrashReporting>
</PropertyGroup>

…ash reporting before signal chaining

Agent-Logs-Url: https://github.com/dotnet/android/sessions/55e4fb9d-2935-4e5a-961c-386c256574cc

Co-authored-by: mdh1418 <16830051+mdh1418@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable .NET Runtime crash reporting before signal chaining [Diagnostics] Enable .NET Runtime crash reporting before signal chaining May 5, 2026
Copilot AI requested a review from mdh1418 May 5, 2026 17:18
Copilot finished work on behalf of mdh1418 May 5, 2026 17:18
`False` if using `$(AndroidDexTool)=dx` and `True` if
using [`$(AndroidDexTool)`](#androiddextool)=`d8`.

## AndroidEnableDiagnosticCrashReporting
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question I had here, does this need to be public?

If it's something a customer won't understand/use, it could be $(_AndroidEnableDiagnosticCrashReporting) and undocumented. It would only exist as an optional escape hatch.

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.

[Diagnostics] Enable .NET Runtime crash reporting before signal chaining

3 participants