有没有办法从命令行运行DebugDiag Analysis?

时间:2017-02-19 20:48:35

标签: debugging automation windbg debugdiag

有没有办法从命令行调用DebugDiag Analysis?我试过这个: DebugDiag.Analysis.exe "C:\dumps\oops.dmp" 但它只启动了GUI(添加了oops.dmp)。

我正在寻找的是更像这样的东西: DebugDiag.Analysis.exe -dump "C:\dumps\oops.dmp" -out "C:\results\oops-DebugDiag.mht" -anaylsis "CrashHangAnalysis,MemoryAnalysis" 然后这应该运行,而不显示任何GUI。

用例:我们使用SuperDump完全自动运行崩溃转储分析。自动添加DebugDiag .mht报告真的很不错。

可以这样做吗?是否有关于DebugDiag命令行选项的文档?

1 个答案:

答案 0 :(得分:0)

DebugDiag没有开箱即用的CLI。

但是,它通过DebugDiag.DotNet.NetAnalyzer公开了一个名为DebugDiag.DotNet.dll的类,该类在DebugDiag的安装目录中可用。这是文档:

/// <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&lt;AnalysisRuleInfo&gt; 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>

因此,基本上可以使用此API来自动化它。这是两个项目,目前使用它是这样的: