private void CrashDump(int processId, string tempDirectory, DumpTypeOption dumpType, string targetFramework) { var processName = this.processHelper.GetProcessName(processId); EqtTrace.Info($"ProcessDumpUtility.CrashDump: Creating {dumpType.ToString().ToLowerInvariant()} dump of process {processName} ({processId}) into temporary path '{tempDirectory}'."); this.crashDumpDirectory = tempDirectory; this.crashDumper = this.crashDumperFactory.Create(targetFramework); ConsoleOutput.Instance.Information(false, $"Blame: Attaching crash dump utility to process {processName} ({processId})."); this.crashDumper.AttachToTargetProcess(processId, tempDirectory, dumpType); }
private void CrashDump(int processId, string dumpFileGuid, string tempDirectory, DumpTypeOption dumpType, string targetFramework) { var dumpPath = this.GetDumpPath(processId, dumpFileGuid, tempDirectory, isHangDump: false, out var processName); EqtTrace.Info($"ProcessDumpUtility.CrashDump: Creating {dumpType.ToString().ToLowerInvariant()} dump of process {processName} ({processId}) into temporary path '{dumpPath}'."); this.crashDumpPath = dumpPath; if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { throw new NotSupportedException($"Operating system {RuntimeInformation.OSDescription} is not supported for crash dumps."); } this.crashDumper = this.crashDumperFactory.Create(targetFramework); ConsoleOutput.Instance.Information(false, $"Blame: Attaching crash dump utility to process {processName} ({processId})."); this.crashDumper.AttachToTargetProcess(processId, dumpPath, dumpType); }