Skip to content

How to enable debug logging for Windows image builds #10538

Discussion options

You must be logged in to vote

Hi @hendrik-schaffer - To enable debug logging in PowerShell scripts for Windows image builds, you need to set the DebugPreference to "Continue" and ensure that Write-Debug messages are actually written to the console.

For you, I am providing some steps to troubleshoot and ensure debug logging works:-

A. Ensure DebugPreference is correctly set: The correct setting for enabling debug messages is $DebugPreference = "Continue". Make sure this is set in the correct scope (within the script or globally, as needed).

B. Check script content for Write-Debug: Ensure that your PowerShell script (build-image.ps1) is using Write-Debug for logging messages, as opposed to Write-Host or Write-Output.

C.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Prabhatkumar59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants