From c7f657850ee548cb24b5f2fe229f4e4f8098f471 Mon Sep 17 00:00:00 2001 From: Arlo Date: Thu, 29 Jan 2026 00:54:52 -0600 Subject: [PATCH] Add procdump first-chance exception monitoring to CI test runs This adds a procdump monitoring step before running component tests that: - Monitors for first-chance exceptions using procdump -e 1 flag - Attaches to the test process by name (CommunityToolkit.Tests..exe) - Creates full memory dumps when first-chance exceptions occur - Only runs when ENABLE_DIAGNOSTICS is true and on uwp/wasdk builds This helps capture crash information for exceptions that may be caught and swallowed, providing better diagnostics for intermittent test failures. --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6609ce2c..ac1135b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,6 +158,13 @@ jobs: id: test-generator run: vstest.console.exe ./tooling/CommunityToolkit.Tooling.SampleGen.Tests/bin/Release/net8.0/CommunityToolkit.Tooling.SampleGen.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx" + - name: Start Procdump monitoring for first-chance exceptions + if: ${{ (matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk') && env.ENABLE_DIAGNOSTICS == 'true' }} + shell: pwsh + run: | + $procdumpArgs = @("-accepteula", "-e", "1", "-w", "CommunityToolkit.Tests.${{ matrix.multitarget }}.exe", "-ma", "${{ env.PROCDUMP_PATH }}") + Start-Process -FilePath "${{ env.PROCDUMP_PATH }}/procdump64.exe" -ArgumentList $procdumpArgs -NoNewWindow + - name: Run component tests against ${{ matrix.multitarget }} if: ${{ matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk' }} id: test-platform @@ -467,3 +474,4 @@ jobs: with: name: linux-logs path: ./**/*.*log +