Fixes #3982. Add Draw trace category and instrument View.Drawing.cs#4831
Draft
Copilot wants to merge 3 commits intov2_developfrom
Draft
Fixes #3982. Add Draw trace category and instrument View.Drawing.cs#4831Copilot wants to merge 3 commits intov2_developfrom
Copilot wants to merge 3 commits intov2_developfrom
Conversation
…nImpl.LayoutAndDraw Co-authored-by: tig <585482+tig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add draw trace category and instrument configuration manager
Fixes #3982. Add Draw trace category and instrument View.Drawing.cs
Mar 11, 2026
Collaborator
|
@copilot ensure UICatalog has a menuitem for this and the recently added Config flag as well (it was an oversights to not do that). |
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Contributor
Author
Done in 478c5f8. Added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
Drawtrace category to the tracing infrastructure and instruments the draw pipeline withTrace.Draw(...)calls, enabling diagnostic tracing for draw operations in DEBUG builds. Also adds UICatalog menu items for theConfigurationandDrawtrace categories.Proposed Changes/Todos
TraceCategory.cs—Draw = 64added to[Flags]enum;Allupdated to include itTrace.cs—Trace.Draw(string? id, string phase, string? message = null, [CallerMemberName] string method = "")following the existing[Conditional("DEBUG")]/ guard /Backend.LogpatternApplicationImpl.Screen.cs—LayoutAndDraw: traced atStart(withforceRedraw) andEnd(withneededLayout/needsDraw)View.Drawing.cs— StaticDraw(IEnumerable<View>, bool force): traces each view before its draw call; InstanceDraw(DrawContext?): traces each phase —Start,Adornments,SubViews,Text,Content,LineCanvas,EndTraceTests.cs—TraceCategory_Draw_HasExpectedValue,TraceCategory_All_IncludesDraw,Draw_Category_CanBeEnabledUICatalogRunnable.cs— AddedCon_figurationand_DrawCheckBox menu items to the_Loggingmenu so both trace categories can be toggled at runtimePull Request checklist:
CTRL-K-Dto automatically reformat your files before committing.dotnet testbefore commit///style comments)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.