mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-26 03:09:06 +00:00
Add command-line option to wait for debugger on startup
This commit is contained in:
parent
5a169aeeca
commit
9c9b41ae04
1 changed files with 11 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using Kettu;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
|
@ -17,6 +18,16 @@ namespace LBPUnion.ProjectLighthouse
|
|||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args[0] == "--wait-for-debugger")
|
||||
{
|
||||
Console.WriteLine("Waiting for a debugger to be attached...");
|
||||
while (!Debugger.IsAttached)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
Console.WriteLine("Debugger attached.");
|
||||
}
|
||||
|
||||
// Log startup time
|
||||
Stopwatch stopwatch = new();
|
||||
stopwatch.Start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue