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

DevDiagnostics - Don't treat every tool addition/removal as a dump analyzer #3821

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@ private void AllExternalTools_CollectionChanged(object? sender, NotifyCollection
// with it.
if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems is not null)
{
List<Tool> newAnalysisTools = new();
andreww-msft marked this conversation as resolved.
Show resolved Hide resolved

foreach (Tool tool in e.NewItems)
{
if (tool.Type.HasFlag(ToolType.DumpAnalyzer))
{
_registeredAnalysisTools.Add(tool);
newAnalysisTools.Add(tool);
}
}

foreach (var report in _werAnalysisReports)
{
RunToolAnalysis(report, e.NewItems.Cast<Tool>().ToList());
RunToolAnalysis(report, newAnalysisTools);
}
}

Expand All @@ -101,11 +104,11 @@ private void AllExternalTools_CollectionChanged(object? sender, NotifyCollection
if (tool.Type.HasFlag(ToolType.DumpAnalyzer))
{
_registeredAnalysisTools.Remove(tool);
}

foreach (var report in _werAnalysisReports)
{
report.RemoveToolAnalysis(tool);
foreach (var report in _werAnalysisReports)
{
report.RemoveToolAnalysis(tool);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void UpdateInfoBox()
}
else
{
Debug.Assert(currentSelectedIndex == 0, "Expected only the first item would have a null tag");
Debug.Assert(currentSelectedIndex == 0 || currentSelectedIndex == -1, "Expected only the first item would have a null tag");
WERInfo.Text = info.Report.Description;
}
}
Expand Down
Loading