Add enable crash report flag to WriteDump client API#2715
Add enable crash report flag to WriteDump client API#2715mikem8361 merged 2 commits intodotnet:mainfrom
Conversation
Uses new write dump command supported by 6.0 runtime to pass a set of flags instead of just the logging enabled bool. Issue: dotnet#2698
|
Runtime repro PR: dotnet/runtime#60995 |
noahfalk
left a comment
There was a problem hiding this comment.
LGTM, modulo the few comments. Thanks Mike!
src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs
Show resolved
Hide resolved
|
|
||
| private static Option CrashReportOption() => | ||
| new Option( | ||
| alias: "--crashreport", |
There was a problem hiding this comment.
Is there an issue filed or PR open to add the docs for this new feature to docs.microsoft.com?
There was a problem hiding this comment.
That issue covers the APIs, but doesn't mention dotnet-dump the tool and the new argument being added here. Can you either expand the scope of the issue or add a new one?
There was a problem hiding this comment.
I added a comment about the new option to the doc issue.
|
|
||
| if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||
| { | ||
| if (crashreport) |
There was a problem hiding this comment.
How is this not supported on Windows? I thought crash reports were possible on Windows. I seen many programs use such a thing before there too.
There was a problem hiding this comment.
The crash report referenced here is a special json file that the Linux and MacOS tool createdump tool generates. The Windows "createdump" just calls the OS's MiniDumpWriteDump to generate dump and doesn't have a way to generate this json file. On Linux and MacOS createdump explicitly gathers the runtime process's state and writes both the core dump and the crash report json from that data.
Uses new write dump command supported by 6.0 runtime to pass a set of flags instead
of just the logging enabled bool.
Issue: #2698