Description
I run a .NET application with environment variable DOTNET_DbgEnableMiniDump=1. If an unhandled exception
occurs in main thread, the dump file is generated correctly. But if an unhandled exception occurs in worker thread, no dump file is generated.
Reproduction Steps
using powershell on windows:
dotnet new console
- Change Program.cs to
var thread = new Thread(() =>
{
throw new Exception();
});
thread.Start();
thread.Join();
- run
$env:DOTNET_DbgEnableMiniDump=1
- run
dotnet run
Expected behavior
Dump is generated and placed in %LocalAppData%/Temp dir.
Actual behavior
No dump is generated.
Console output:
Unhandled exception. System.Exception: Exception of type 'System.Exception' was thrown.
at Program.<>c.<<Main>$>b__0_0() in C:\dumptest\Program.cs:line 3
Regression?
No response
Known Workarounds
No response
Configuration
- Which version of .NET is the code running on? - 8.0.300
- What OS and version, and what distro if applicable? - windows11 23H2
- What is the architecture (x64, x86, ARM, ARM64)? - x64
- Do you know whether it is specific to that configuration? -no. I have tried .NET 6, but also no dump file is generated.
Other information
No response