From 372cb75c285fff622ef58944fe23bd3aaf3605ba Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 8 Sep 2018 16:06:13 -0400 Subject: [PATCH] More changes to make debugging Host Watchdog easier --- .../Properties/launchSettings.json | 1 + src/Tgstation.Server.Host.Watchdog/Watchdog.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host.Console/Properties/launchSettings.json b/src/Tgstation.Server.Host.Console/Properties/launchSettings.json index 5991274947..d8b2b440e6 100644 --- a/src/Tgstation.Server.Host.Console/Properties/launchSettings.json +++ b/src/Tgstation.Server.Host.Console/Properties/launchSettings.json @@ -10,6 +10,7 @@ "profiles": { "Tgstation.Server.Host.Console": { "commandName": "Project", + "commandLineArgs": "--attach-host-debugger", "workingDirectory": "bin\\Debug\\netcoreapp2.0", "launchBrowser": true, "environmentVariables": { diff --git a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs index 9a43ec441d..2f8905d7ad 100644 --- a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs @@ -124,7 +124,8 @@ namespace Tgstation.Server.Host.Watchdog '"' + assemblyPath + '"', updateDirectory }; - if (Debugger.IsAttached) + + if (Environment.GetCommandLineArgs().Any(x => x == "--attach-host-debugger")) arguments.Add("--attach-debugger"); arguments.AddRange(args);