有没有一种从命令行调用DebugDiag分析的方法?我尝试过这样做: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"然后它应该运行,而不显示任何图形用户界面。
Usecase:我们正在使用SuperDump运行崩溃转储分析。自动添加DebugDiag .mht报告将非常好。
这能办到吗?有关于DebugDiag命令行选项的文档吗?
发布于 2017-03-06 23:02:35
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<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>因此,基本上可以使用这个API来实现它的自动化。下面是两个项目,目前使用它的方式如下:
https://stackoverflow.com/questions/42332685
复制相似问题