public static void RunAndDumpOnException(string applicationPath, string dumpPath, bool miniDump) { using (Dumper dumper = new Dumper(applicationPath, dumpPath, miniDump)) { while (!dumper.dumpTaken) { dumper.control.WaitForEvent(0, uint.MaxValue); } dumper.client.EndSession((uint)Defines.DebugEndActiveTerminate); } }
public static void Main(string[] args) { Options options = null; Parser.Default.ParseArguments <Options>(args) .WithParsed(o => options = o); if (options == null) { return; } Dumper.RunAndDumpOnException(options.AppPath, options.DumpPath, options.MiniDump); }