-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Is your feature request related to a problem? Please describe.
When working with Avalonia in design-time or diagnostic tools, it is currently not possible to quickly navigate from a visual element back to its original .axaml file and line number.
This makes debugging and inspecting complex XAML layouts difficult, especially in large projects.
Describe the solution you'd like
I would like to add AXAML SourceInformation to debug builds by extending the AXAML compiler so that each generated XAML tag includes source metadata (file path, line, and column).
This would enable a “Jump to Source” feature in multiple contexts:
- Designer – navigate from the design surface directly to the corresponding XAML element.
- DevTools Tree – jump from a visual element in the diagnostics tree to its definition in source.
This would significantly improve the developer experience when debugging layouts, inspecting controls, or exploring existing codebases.
Describe alternatives you've considered
No response
Additional context
I have experimented with modifying the AXAML compiler to embed source information and added a working “Jump to Source” button in both the Avalonia.Diagnostics DevTools and the Designer (by overlaying selectable regions in the DesignWindowLoader).
Example in Designer:
2025-11-01.00-03-01.mp4
Example in DevTools:
2025-11-01.00-11-21.mp4
If the core team is interested in this direction, I will finalize and clean up my local implementation and open a pull request for review.