Is there a way to invoke DebugDiag Analysis from the command line? I've tried this:
DebugDiag.Analysis.exe "C:\dumps\oops.dmp"
But it only started up the GUI (with oops.dmp
added).
What I am looking for is something more like this:
DebugDiag.Analysis.exe -dump "C:\dumps\oops.dmp" -out "C:\results\oops-DebugDiag.mht" -anaylsis "CrashHangAnalysis,MemoryAnalysis"
Then this should run, without showing any GUI.
Usecase: We're running our crash dump analysis fully automated with SuperDump. Adding DebugDiag .mht
reports automatically would be really nice.
Can this be done? Is there any documentation on DebugDiag commandline options?
DebugDiag does not explose a CLI out of the box.
However, it exposes a class named DebugDiag.DotNet.NetAnalyzer
via DebugDiag.DotNet.dll
which is available in the installation directory of DebugDiag. Here is it's documentation:
/// <summary>
/// The NetAnalyzer object is used to determine available analysis scripts, add data files, and start an analysis.
/// This object is used internally by the DebugDiag Analysis user interface to manage analysis rules.
/// End users can use this object to develop their own rules, batch files, or GUI's to manage data analysis.
/// </summary>
/// <remarks>
/// <example>
/// <code language="cs">
/// using (NetAnalyzer analyzer = new NetAnalyzer())
/// {
/// //In this example I'm referencing a dll module that has the prebuild rules that ship with debugdiag
/// analyzer.AddAnalysisRulesToRunList(@"C:\Program Files\DebugDiag\AnalysisRules\DebugDiag.AnalysisRules.dll", false);
///
/// List<AnalysisRuleInfo> analysisRules = analyzer.AnalysisRuleInfos;
///
/// Console.WriteLine("The available rules on the analyzer are: \n\r\n\r");
///
/// foreach(AnalysisRuleInfo ruleInfo in analysisRules)
/// {
/// Console.WriteLine(ruleInfo.DisplayName);
/// }
/// }
/// </code>
/// </example>
/// </remarks>
So, basically it's possible to use this API to automate it. Here are two projects, which currently use it like this: