From d5cc261985675b4da8394f60ed2faab0aab7ddfc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 5 Feb 2015 17:15:45 -0800 Subject: [PATCH] Spawn new mono processes with --debug --- src/NzbDrone.Common/Processes/ProcessProvider.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index 1579e0c61d..7bc8170861 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -102,7 +102,7 @@ public Process Start(string path, string args = null, Action onOutputDat { if (OsInfo.IsMonoRuntime && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) { - args = path + " " + args; + args = GetMonoArgs(path, args); path = "mono"; } @@ -161,7 +161,7 @@ public Process SpawnNewProcess(string path, string args = null) { if (OsInfo.IsMonoRuntime && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) { - args = path + " " + args; + args = GetMonoArgs(path, args); path = "mono"; } @@ -302,5 +302,10 @@ private List GetProcessesByName(string name) return processes; } + + private string GetMonoArgs(string path, string args) + { + return String.Format("--debug {0} {1}", path, args); + } } }