Skip to content

Commit 0550de0

Browse files
committed
Add background pwsh stderr dump on timeout for debugging
1 parent 9068011 commit 0550de0

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/cross-platform-test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,25 @@ jobs:
447447
if ($task.Wait($TimeoutMs)) {
448448
return $task.Result
449449
} else {
450-
# On timeout, dump stderr for debugging
450+
# On timeout, dump both Proxy and background pwsh stderr for debugging
451451
Write-Host "=== Proxy stderr (timeout debug) ===" -ForegroundColor Red
452452
while ($process.StandardError.Peek() -ge 0) {
453453
Write-Host ([char]$process.StandardError.Read()) -NoNewline
454454
}
455455
Write-Host ""
456+
457+
Write-Host "=== Background pwsh stderr (timeout debug) ===" -ForegroundColor Red
458+
# Kill bgProcess first to flush stderr
459+
if (-not $bgProcess.HasExited) {
460+
$bgProcess.Kill()
461+
$bgProcess.WaitForExit(3000)
462+
}
463+
if ($bgStderrTask.Wait(3000)) {
464+
Write-Host $bgStderrTask.Result
465+
} else {
466+
Write-Host "(stderr read timeout)"
467+
}
468+
456469
throw "Timeout waiting for response"
457470
}
458471
}

0 commit comments

Comments
 (0)