-
Notifications
You must be signed in to change notification settings - Fork 323
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
DevDiagnostics - Move the enablement of local watson collection to a separate process #3835
Conversation
|
||
namespace DevHome.DevDiagnostics.Helpers; | ||
|
||
internal sealed class WERUtils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No exception handling in this class, nor in its caller...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, if it fails, something bad has happened... not much we can do to recover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but log before we failfast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure where/what I would log. If I'm unable to read the registry, the exception will bubble up to either DevDiagnostics or EnableLocalCabCollection and result in a Watson crash.
Same goes with the writing.... it would fail if this is called from a medium IL context, but should work elevated. If I'm wrong, there will be a Watson crash to track the failure.
tools/DevDiagnostics/DevHome.DevDiagnostics/ViewModels/WERPageViewModel.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of the pull request
The original implementation to enable local WER collection for an app involved having to relaunch DevDiagnostics elevated. This lead to some clumsy UX...
This cleans up the UX a bit, and to enable/disable local WER collection, will launch a separate app that will require a UAC.
It's not perfect yet, and definitely looking to Design to help clean this up further.
References and relevant issues
Detailed description of the pull request / Additional comments
To help facilitate some code sharing between the standalone exe and DevDiagnostics, I ended up creating a shared WERUtils.cs that was used to read/enable/disable local cab collection.
Validation steps performed
Enabled/disabled WER collection. Confirmed Narrator works for the updates (I end up having Narrator read the tooltip for the button when the user selects it).
PR checklist