Skip to content

Commit 419baa2

Browse files
authored
feat: add --debugger flag to wait for debugger (AscensionGameDev#2004)
this makes debugging startup failures on remote devices (like steamdecks) easier to accomplish
1 parent 2ee80c9 commit 419baa2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Intersect.Client/Program.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ static class Program
2727
[STAThread]
2828
internal static void Main(string[] args)
2929
{
30+
var waitForDebugger = args.Contains("--debugger");
31+
32+
while (waitForDebugger && !Debugger.IsAttached)
33+
{
34+
System.Console.WriteLine("Waiting for debugger, sleeping 5000ms...");
35+
Thread.Sleep(5000);
36+
}
37+
3038
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
3139

3240
ExportDependencies();

0 commit comments

Comments
 (0)