【问题标题】:Is there a way to run DebugDiag Analysis from the command line?有没有办法从命令行运行 DebugDiag Analysis?
【发布时间】:2017-02-19 20:48:35
【问题描述】:

有没有办法从命令行调用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 命令行选项的文档?

【问题讨论】:

    标签: debugging automation windbg debugdiag


    【解决方案1】:

    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 来自动化它。这里有两个项目,目前是这样使用的:

    【讨论】:

      猜你喜欢
      • 2022-10-21
      • 1970-01-01
      • 2015-03-12
      • 2021-08-01
      • 1970-01-01
      • 2012-08-15
      • 2023-04-01
      • 2010-11-29
      • 1970-01-01
      相关资源
      最近更新 更多