@@ -585,7 +585,12 @@ await RunWithAttachableProcess(logStatements, async (filePath, processId) =>
585
585
586
586
// Wait until we hit the breakpoint
587
587
stoppedEvent = await nextStoppedTask ;
588
- Assert . Equal ( "breakpoint" , stoppedEvent . Reason ) ;
588
+
589
+ // WinPS has a bug on attach where it doesn't send the breakpoints on the stop event.
590
+ string expectedReason = PsesStdioLanguageServerProcessHost . IsWindowsPowerShell
591
+ ? "step"
592
+ : "breakpoint" ;
593
+ Assert . Equal ( expectedReason , stoppedEvent . Reason ) ;
589
594
590
595
// The code before the breakpoint should have already run
591
596
// It will contain the actual script being run
@@ -664,7 +669,7 @@ private async Task RunWithAttachableProcess(string[] logStatements, Func<string,
664
669
# Keep running until the runner has deleted the test script to
665
670
# ensure the process doesn't finish before the test does in
666
671
# normal circumstances.
667
- while (Test-Path -Path $TestScript) {
672
+ while (Test-Path -LiteralPath $TestScript) {
668
673
Start-Sleep -Seconds 1
669
674
}
670
675
" ;
@@ -703,7 +708,7 @@ private async Task RunWithAttachableProcess(string[] logStatements, Func<string,
703
708
} ;
704
709
psi . EnvironmentVariables [ "TERM" ] = "dumb" ; // Avoids color/VT sequences in test output.
705
710
706
- // Task shouldn't take longer than 10 seconds to complete.
711
+ // Task shouldn't take longer than 30 seconds to complete.
707
712
using CancellationTokenSource debugTaskCts = new CancellationTokenSource ( TimeSpan . FromSeconds ( 30 ) ) ;
708
713
using Process psProc = Process . Start ( psi ) ;
709
714
try
0 commit comments