@@ -642,6 +642,8 @@ public static bool TryPrintStackTraceFromDmp(string dmpFile, TextWriter outputWr
642
642
// The children are sorted in the order they should be dumped
643
643
static unsafe IEnumerable < Process> FindChildProcessesByName( Process process , string childName )
644
644
{
645
+ Console . WriteLine ( $ "Finding all child processes of '{ process . ProcessName } ' (ID: { process . Id } ) with name '{ childName } '") ;
646
+
645
647
var children = new Stack< Process > ( ) ;
646
648
Queue < Process > childrenToCheck = new Queue < Process > ( ) ;
647
649
HashSet < int > seen = new HashSet < int > ( ) ;
@@ -656,6 +658,7 @@ static unsafe IEnumerable<Process> FindChildProcessesByName(Process process, str
656
658
if ( seen . Contains ( child . Id ) )
657
659
continue;
658
660
661
+ Console . WriteLine ( $"Checking child process: '{child.ProcessName}' (ID: {child.Id})" ) ;
659
662
seen . Add ( child . Id ) ;
660
663
661
664
foreach ( var grandchild in child. GetChildren ( ) )
@@ -784,9 +787,19 @@ public int RunTest(string executable, string outputFile, string errorFile, strin
784
787
outputWriter. WriteLine ( "\n cmdLine:{0} Timed Out (timeout in milliseconds: {1}{2}{3}, start: {4}, end: {5})" ,
785
788
executable , timeout , ( environmentVar != null ) ? " from variable " : "" , ( environmentVar != null ) ? TIMEOUT_ENVIRONMENT_VAR : "" ,
786
789
startTime . ToString ( ) , endTime . ToString ( ) ) ;
790
+ outputWriter. Flush ( ) ;
787
791
errorWriter. WriteLine ( "\n cmdLine:{0} Timed Out (timeout in milliseconds: {1}{2}{3}, start: {4}, end: {5})" ,
788
792
executable , timeout , ( environmentVar != null ) ? " from variable " : "" , ( environmentVar != null ) ? TIMEOUT_ENVIRONMENT_VAR : "" ,
789
793
startTime . ToString ( ) , endTime . ToString ( ) ) ;
794
+ errorWriter. Flush ( ) ;
795
+
796
+ Console. WriteLine ( "Collecting diagnostic information..." ) ;
797
+ Console. WriteLine ( "Snapshot of processes currently running:" ) ;
798
+ Console. WriteLine ( $ "\t { "ID" , - 6 } ProcessName") ;
799
+ foreach ( var activeProcess in Process. GetProcesses ( ) )
800
+ {
801
+ Console. WriteLine ( $ "\t { activeProcess . Id , - 6 } { activeProcess . ProcessName } ") ;
802
+ }
790
803
791
804
if ( collectCrashDumps )
792
805
{
0 commit comments