本文介绍了如何为Cake启用诊断详细程度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行 build.cake 文件时遇到一些问题,但是我无法立即看到问题所在。有没有一种方法可以启用诊断详细信息,因此我可以获得有关正在发生的事情以及如何解决该问题的更多信息?

I am having some problems running my build.cake file, but I can't immediately see what the problem is. Is there a way to enable diagnostic verbosity, so I can get more information about what is going on, and how to fix the problem?

推荐答案

是的,您可以轻松地在Cake中启用诊断详细信息。这使您可以查看有关Cake执行的更多信息,包括传递给Cake可以代表您调用的众多基础工具的实际命令和参数。如果您在调用工具时发现问题,而事情却没有按预期进行,则此功能特别有用。通过获取正在调用的命令,您可以在Cake上进行测试,以确保它按预期运行。

Yes, you can easily enable diagnostic verbosity in Cake. This allows you to see much more information about the Cake execution, including the actual commands, and arguments, that are passed to the numerous underlying tools that Cake can call on your behalf. This can be especially useful if you are finding issues when calling tools, and things aren't working as expected. By getting the command that is being called, you can test this outwith Cake to make sure it is working as expected.

如何启用诊断详细信息实际上取决于您的状态调用 cake.exe

How you enable diagnostic verbosity really depends on how you are calling the cake.exe.

直接

cake.exe --verbosity = diagnostic

通过PowerShell Bootstrapper

.\build.ps1-详细度诊断

通过Bash引导程序

.\build.sh --verbosity = diagnostic

注意:另一个选择可能是调试 build.cake 文件。这可以通过将-debug 传递到 cake.exe ,然后附加调试器来完成。可以在。

NOTE: Another option might be to debug your build.cake file. This can be done by passing --debug into cake.exe, and then attaching the debugger. More information on this can be found here.

此外,您还可以通过其他选项来设置Verbosity标志。这些在中进行了描述。这些选项是:

In addition, you can also pass other options for the Verbosity flag. These are described in detail here. These options are:


  • 最小

  • 普通

  • 安静

  • 详细

  • Minimal
  • Normal
  • Quiet
  • Verbose

这篇关于如何为Cake启用诊断详细程度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 21:03