@@ -642,6 +642,8 @@ public static bool TryPrintStackTraceFromDmp(string dmpFile, TextWriter outputWr
642642 // The children are sorted in the order they should be dumped
643643 static unsafe IEnumerable < Process> FindChildProcessesByName( Process process , string childName )
644644 {
645+ Console . WriteLine ( $ "Finding all child processes of '{ process . ProcessName } ' (ID: { process . Id } ) with name '{ childName } '") ;
646+
645647 var children = new Stack< Process > ( ) ;
646648 Queue < Process > childrenToCheck = new Queue < Process > ( ) ;
647649 HashSet < int > seen = new HashSet < int > ( ) ;
@@ -656,6 +658,7 @@ static unsafe IEnumerable<Process> FindChildProcessesByName(Process process, str
656658 if ( seen . Contains ( child . Id ) )
657659 continue;
658660
661+ Console . WriteLine ( $"Checking child process: '{child.ProcessName}' (ID: {child.Id})" ) ;
659662 seen . Add ( child . Id ) ;
660663
661664 foreach ( var grandchild in child. GetChildren ( ) )
@@ -784,9 +787,19 @@ public int RunTest(string executable, string outputFile, string errorFile, strin
784787 outputWriter. WriteLine ( "\n cmdLine:{0} Timed Out (timeout in milliseconds: {1}{2}{3}, start: {4}, end: {5})" ,
785788 executable , timeout , ( environmentVar != null ) ? " from variable " : "" , ( environmentVar != null ) ? TIMEOUT_ENVIRONMENT_VAR : "" ,
786789 startTime . ToString ( ) , endTime . ToString ( ) ) ;
790+ outputWriter. Flush ( ) ;
787791 errorWriter. WriteLine ( "\n cmdLine:{0} Timed Out (timeout in milliseconds: {1}{2}{3}, start: {4}, end: {5})" ,
788792 executable , timeout , ( environmentVar != null ) ? " from variable " : "" , ( environmentVar != null ) ? TIMEOUT_ENVIRONMENT_VAR : "" ,
789793 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+ }
790803
791804 if ( collectCrashDumps )
792805 {
0 commit comments