Skip to content

Commit

Permalink
When running in debugger, always force a enter to close debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Feb 18, 2020
1 parent 68c8cff commit a884364
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/PaketChain/Program.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
using McMaster.Extensions.CommandLineUtils;
using System;
using System.Diagnostics;
using System.Threading.Tasks;

namespace PaketChain
{
internal class Program
{
public static int Main(string[] args) => CommandLineApplication.Execute<RunnerArgs>(args);
public static async Task<int> Main(string[] args)
{
try
{
return await CommandLineApplication.ExecuteAsync<RunnerArgs>(args);
}
finally
{
if (Debugger.IsAttached)
{
Console.WriteLine("");
Console.WriteLine("-----------------------------------------------------");
Console.WriteLine("Press Enter To Close Debugger");
Console.ReadLine();
}
}
}
}
}

0 comments on commit a884364

Please sign in to comment.