I am working in a quite complex code base of powershell build scripts with a lot of dependencies on other PS scripts. Everything is dot-sourced, no module.
As we are refactoring the code into functions, a lot of issues are creeping up, mainly a liberal use of write-output for logging.
I try to enforce using write-verbose for logging, because the scripts will be deployed in release manager.
For some reason, as a build is executing, I don't see the verbose information. It is only shown afterwards when I inspect a specific step.
Write-Verbose usually outputs "Verbose:...." but in release manager I get "##[debug]Verbose" instead.
Is there a way to hide the [debug]Verbose prefix? Is there a better way to output logging info that would be shown in release manager?
This may due to you have enable Verbose Output in Team Foundation Release Logs
Navigate to the Variables tab and check if there is a variable named
system.debugand its value set to true. If so, you will get a log with ##[debug] prefix such as below screenshot:Set the value= false or directly delete the variable.