From aad50d14759cf51deb55d2b980541f2500246a70 Mon Sep 17 00:00:00 2001 From: v-AndriiKhyliuk Date: Fri, 30 Jan 2026 13:06:39 +0100 Subject: [PATCH] [windows-2025] Add CDB (#13559) --- .../windows/scripts/build/Install-VisualStudio.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/images/windows/scripts/build/Install-VisualStudio.ps1 b/images/windows/scripts/build/Install-VisualStudio.ps1 index e07ba31aa..9c3006841 100644 --- a/images/windows/scripts/build/Install-VisualStudio.ps1 +++ b/images/windows/scripts/build/Install-VisualStudio.ps1 @@ -41,4 +41,18 @@ Install-Binary -Type EXE ` -InstallArgs @("/q", "/norestart", "/ceip off", "/features OptionId.UWPManaged OptionId.UWPCPP OptionId.UWPLocalized OptionId.DesktopCPPx86 OptionId.DesktopCPPx64 OptionId.DesktopCPParm64") ` -ExpectedSubject $(Get-MicrosoftPublisher) +# Enable Windows Desktop Debuggers (cdb.exe) on Windows Server 2025 +if (Test-IsWin25) { + $installerEntry = Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* ` + | Where-Object { $_.DisplayName -match "Windows Software Development Kit" } ` + | Sort-Object DisplayVersion -Descending | Select-Object -First 1 + + if ($installerEntry -and $installerEntry.BundleCachePath) { + Install-Binary -Type EXE ` + -LocalPath $installerEntry.BundleCachePath ` + -InstallArgs @("/features", "OptionId.WindowsDesktopDebuggers", "/q", "/norestart") ` + -ExpectedSubject $(Get-MicrosoftPublisher) + } +} + Invoke-PesterTests -TestFile "VisualStudio"