简体   繁体   English

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

[英]Is there a way to run DebugDiag Analysis from the command line?

Is there a way to invoke DebugDiag Analysis from the command line? 有没有办法从命令行调用DebugDiag Analysis? I've tried this: DebugDiag.Analysis.exe "C:\\dumps\\oops.dmp" But it only started up the GUI (with oops.dmp added). 我试过这个: DebugDiag.Analysis.exe "C:\\dumps\\oops.dmp"但它只启动了GUI(添加了oops.dmp )。

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

Usecase: We're running our crash dump analysis fully automated with SuperDump . 用例:我们使用SuperDump完全自动运行崩溃转储分析。 Adding DebugDiag .mht reports automatically would be really nice. 自动添加DebugDiag .mht报告将非常好。

Can this be done? 可以这样做吗? Is there any documentation on DebugDiag commandline options? 是否有关于DebugDiag命令行选项的文档?

DebugDiag does not explose a CLI out of the box. DebugDiag没有开箱即用的CLI。

However, it exposes a class named DebugDiag.DotNet.NetAnalyzer via DebugDiag.DotNet.dll which is available in the installation directory of DebugDiag. 但是,它通过DebugDiag.DotNet.dll暴露了一个名为DebugDiag.DotNet.NetAnalyzer的类,它在DebugDiag.DotNet.NetAnalyzer的安装目录中可用。 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&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>

So, basically it's possible to use this API to automate it. 因此,基本上可以使用此API来自动化它。 Here are two projects, which currently use it like this: 这是两个项目,目前使用它像这样:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM