File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments