Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dev Home log collecting powershell script #3127

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

dkbennett
Copy link
Member

@dkbennett dkbennett commented Jun 5, 2024

Summary of the pull request

Adds a refined log gathering script from the feedback and discussion of PR #2953 . The changes to the script were quite extensive and so it was cleaner to create a new PR.

This script collects all .dhlogs from across the different Microsoft-published DevHome packages and extensions.

References and relevant issues

Detailed description of the pull request / Additional comments

Script was added to tools/scripts folder, and also updated in the Dev Home solution so it can be easily found and updated from there.

Script features:

  • Names by timestamp to the second, which is not perfectly unique but should be good enough for any reasonable use and is very human readable.
  • Has a "-StopDevHome" parameter to terminate any Dev Home processes running, which can hold the lock on files. Since this is destructive it is not the default.
  • Archive is created in the user's temp folder.
  • Preserves folder structure of the logs within their respective packages to avoid collisions between different packages with similar log naming.
  • Only gets .dhlog files from the specified set of package names, which includes DevHome, GitHub extension, and Azure extension, and their Canary and Dev versions.
  • Copies the resulting archive path to the clipboard for easy pasting and prints it to the screen.
     

Validation steps performed

  • Tested gathering logs from across multiple packages.
  • Verified each of the above features.
  • Confirmed resulting archive can be readily opened in Explorer or by an archive-reading tooling.

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

Copy link
Collaborator

@krschau krschau left a comment

Choose a reason for hiding this comment

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

Probably for a different change, but can we add a button inside Dev Home to run this?

@krschau krschau added this to the Dev Home 0.15 milestone Jun 5, 2024
@dkbennett dkbennett merged commit 813d7ff into main Jun 5, 2024
4 checks passed
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.

4 participants