Enabling Verbose Output in Team Foundation Build Logs

There are a lot of great new features available in the new Team Foundation Build (formerly knows as Build v.Next) such as version history, web-based build definitions, open source build tasks, and much, much more. However, sometimes you simply want to accomplish something that you’re currently doing with your “old” XAML builds such as setting the logging verbosity to diagnostic. In TFS this was a simple property you could set when queuing a build. However, that property is nowhere to be found in the new Team Foundation Build system.

There is, however, a way you can set logging verbosity to diagnostic in your new build definitions. In your build definition, navigate to the Variables tab and add a new variable named system.debug and set its value to true.

image

Save your build definition and queue a new build. As the build runs, you will see various debug-related output that you would not normally see.

For example, the image below shows part of the “Build solution…” log before setting the above variable:

image

The image below shows the same section after enabling debug mode:

image

Notice the ##[debug] statements in the log.

If you are debugging a build and want a better idea as to what is going on behind the scenes then I recommend this approach. If you happen to make use of build templates, I recommend adding this variable to your build definition with a default value of false. If you need to set it to true in the future then at least you don’t have to remember what the variable is called if it’s already there.

Comments are closed.

Related Posts