How to enable diagnostic verbosity for 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?
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.
How you enable diagnostic verbosity really depends on how you are calling the cake.exe
.
Directly
cake.exe --verbosity=diagnostic
Via PowerShell Bootstrapper
.\build.ps1 -Verbosity Diagnostic
Via Bash Bootstrapper
.\build.sh --verbosity=diagnostic
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.
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