2017-02-19 112 views
0

有沒有辦法從命令行調用DebugDiag分析?我試過這個: DebugDiag.Analysis.exe "C:\dumps\oops.dmp" 但它只啓動了GUI(添加了oops.dmp)。有沒有辦法從命令行運行DebugDiag Analysis?

我所尋找的是更多的東西是這樣的: DebugDiag.Analysis.exe -dump "C:\dumps\oops.dmp" -out "C:\results\oops-DebugDiag.mht" -anaylsis "CrashHangAnalysis,MemoryAnalysis" 那麼這應該運行,而不顯示任何GUI。

用例:我們正在使用SuperDump完全自動運行崩潰轉儲分析。自動添加DebugDiag .mht報告將非常好。

可以這樣做嗎? DebugDiag命令行選項上是否有任何文檔?

回答

0

DebugDiag不會提供開箱即用的CLI。

但是,它通過DebugDiag.DotNet.dll公開了名爲DebugDiag.DotNet.NetAnalyzer的類,它在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來自動化它。這裏有兩個項目,目前像這樣使用:

相關問題