[Diagnostics] Enable .NET Runtime crash reporting before signal chaining#11291
Draft
[Diagnostics] Enable .NET Runtime crash reporting before signal chaining#11291
Conversation
…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
| `False` if using `$(AndroidDexTool)=dx` and `True` if | ||
| using [`$(AndroidDexTool)`](#androiddextool)=`d8`. | ||
|
|
||
| ## AndroidEnableDiagnosticCrashReporting |
Member
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android registers signal handlers before .NET's runtime, causing Android to kill the process before .NET crash reporting can run. The
System.Runtime.CrashReportBeforeSignalChainingproperty (dotnet/runtime#123735) allows flipping this order.Changes
Microsoft.Android.Sdk.RuntimeConfig.targets: AddAndroidEnableDiagnosticCrashReportingMSBuild property (defaulttrue) and wire it toSystem.Runtime.CrashReportBeforeSignalChainingviaRuntimeHostConfigurationOptionbuild-properties.md: Document the new propertyWith 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: