Skip to content

Commit 5757058

Browse files
committed
Merge branch 'master' into rkeithhill/is149-scriptpath-spaces
2 parents b6f58e9 + 5a34236 commit 5757058

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/PowerShellEditorServices.Host/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ static void Main(string[] args)
2727
"/waitForDebugger",
2828
StringComparison.InvariantCultureIgnoreCase));
2929

30-
// Should we wait for the debugger before starting?
3130
if (waitForDebugger)
3231
{
33-
// Wait for 25 seconds and then continue
34-
int waitCountdown = 25;
35-
while (!Debugger.IsAttached && waitCountdown > 0)
32+
if (Debugger.IsAttached)
3633
{
37-
Thread.Sleep(1000);
38-
waitCountdown--;
34+
Debugger.Break();
35+
}
36+
else
37+
{
38+
Debugger.Launch();
3939
}
4040
}
4141
#endif

0 commit comments

Comments
 (0)