Skip to content

Conversation

@chetanpandey1266
Copy link
Contributor

@chetanpandey1266 chetanpandey1266 commented Dec 18, 2025

Summary

Enhanced the WebView2 diagnostic log collection script to automatically locate and include the entire Crashpad folder in the diagnostic ZIP file. This improves crash troubleshooting by capturing all crash reports and metadata in one collection.

Changes

  • Automatic process detection: Script now searches for running WebView2 processes to automatically find the user data folder and Crashpad directory
  • Complete Crashpad folder collection: Recursively includes all Crashpad folder contents (crash reports, watson_metadata, etc.).
  • New parameters:
    • ExeName (optional): Specifies the host application executable name for process filtering
    • userDataDir (optional): Manual override for user data directory when automatic detection fails
  • Updated documentation: Reflected new usage and collected files in script.md

@chetanpandey1266 chetanpandey1266 force-pushed the user/chetanpandey/AddWatsonMetaDataToZip branch from 2851d02 to 51c38bd Compare December 18, 2025 11:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the WebView2 diagnostic log collection script to automatically locate and include Crashpad folder contents (crash dumps and metadata) in the diagnostic ZIP file. The changes enable automatic detection of WebView2 processes to find crash data, with fallback manual override options.

  • Adds automatic WebView2 process detection to locate Crashpad folders
  • Introduces new optional parameters for process filtering and manual directory specification
  • Updates ZIP creation to recursively include all Crashpad folder contents

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
diagnostics/script.md Documents new ExeName and userDataDir parameters and describes Crashpad folder collection
diagnostics/resources/log_collection_script.ps1 Implements Crashpad folder detection, process filtering, and ZIP packaging of crash data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# Look for Crashpad folder
$crashpadFolder = ""
$folderToCheck = ""
$uniqueUserDataFolders = @()
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name 'uniqueUserDataFolders' is misleading as it's not actually storing unique folders from multiple processes. The code only stores a single folder and breaks after finding the first match. Consider renaming to 'userDataFolder' (singular) or 'foundUserDataFolder' to better reflect that it only contains one folder path, not multiple unique folders.

Copilot uses AI. Check for mistakes.
Copy link

@gourabkmsft gourabkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chetanpandey1266 chetanpandey1266 merged commit 483e597 into main Dec 19, 2025
1 check passed
@chetanpandey1266 chetanpandey1266 deleted the user/chetanpandey/AddWatsonMetaDataToZip branch December 19, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants