diff --git a/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/MiniDumpLocalVarLookup.csproj b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/MiniDumpLocalVarLookup.csproj
new file mode 100644
index 0000000000..644ea7fa32
--- /dev/null
+++ b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/MiniDumpLocalVarLookup.csproj
@@ -0,0 +1,7 @@
+
+
+ Exe
+ $(BuildProjectFramework)
+ $(SupportedSubProcessTargetFrameworks)
+
+
diff --git a/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/Program.cs b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/Program.cs
new file mode 100644
index 0000000000..cbea65ad93
--- /dev/null
+++ b/src/SOS/SOS.UnitTests/Debuggees/MiniDumpLocalVarLookup/Program.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Diagnostics;
+
+namespace MiniDumpLocalVarLookup;
+
+internal class Program
+{
+ static public void Main()
+ {
+ int intValue = 42;
+ string stringValue = "Hello, World!";
+
+ PrintValues(intValue, stringValue);
+ }
+
+ static void PrintValues(int intValue, string stringValue)
+ {
+ int length = stringValue.Length;
+ Debugger.Break();
+ Console.WriteLine($"intValue: {intValue}");
+ Console.WriteLine($"stringValue: {stringValue} (length = {length})");
+ }
+}
diff --git a/src/SOS/SOS.UnitTests/SOS.cs b/src/SOS/SOS.UnitTests/SOS.cs
index 3a66a4046f..ebf4e0deda 100644
--- a/src/SOS/SOS.UnitTests/SOS.cs
+++ b/src/SOS/SOS.UnitTests/SOS.cs
@@ -139,7 +139,9 @@ internal static async Task RunTest(
string testName = null,
bool testLive = true,
bool testDump = true,
- bool testTriage = false)
+ bool testTriage = false,
+ bool testMini = false,
+ SOSRunner.DumpGenerator dumpGenerator = SOSRunner.DumpGenerator.CreateDump)
{
await RunTest(scriptName,
new SOSRunner.TestInformation
@@ -149,7 +151,8 @@ await RunTest(scriptName,
TestLive = testLive,
TestDump = testDump,
DebuggeeName = debuggeeName,
- DumpType = SOSRunner.DumpType.Heap
+ DumpType = SOSRunner.DumpType.Heap,
+ DumpGenerator = dumpGenerator,
},
output);
@@ -165,7 +168,23 @@ await RunTest(scriptName,
TestLive = false,
TestDump = testDump,
DebuggeeName = debuggeeName,
- DumpType = SOSRunner.DumpType.Triage
+ DumpType = SOSRunner.DumpType.Triage,
+ DumpGenerator = dumpGenerator,
+ },
+ output);
+ }
+ if (testMini && !config.PublishSingleFile)
+ {
+ await RunTest(scriptName,
+ new SOSRunner.TestInformation
+ {
+ TestConfiguration = config,
+ TestName = testName,
+ TestLive = false,
+ TestDump = testDump,
+ DebuggeeName = debuggeeName,
+ DumpType = SOSRunner.DumpType.Mini,
+ DumpGenerator = dumpGenerator,
},
output);
}
@@ -234,6 +253,31 @@ public SOS(ITestOutputHelper output)
public static IEnumerable