dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.16k stars 1.74k forks source link

Support PresentationTraceSources.TraceLevel and PresentationTraceSources.SetTraceLevel() #17304

Open juwens opened 1 year ago

juwens commented 1 year ago

Description

Support better debugging of binding issues. A feature which WPF developers used and relied on since 2010. I was missing in Xamarin and is still missing in maui.

For an extended example see: https://wpf-tutorial.com/data-binding/debugging/

Public API Changes

add Type PresentationTraceSources

<Label Text="{Binding Title, diag:PresentationTraceSources.TraceLevel=High}" />

Intended Use-Case

Being more productive as a developer.

jfversluis commented 1 year ago

Just to understand a bit better... What is it you're missing right now? What triggered you to open this proposal? There is the XAML binding diagnostics and output window that should work and it you enable compiled bindings your should even get build time errors.

What are scenarios that you are still missing and running into that is not captured by these tools and/or why do these tools not work for you?

Thanks!

ghost commented 1 year ago

Hi @juwens. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

juwens commented 1 year ago

What is it you're missing right now? the debugging abilities PresentationTraceSources.TraceLevel provides.

What triggered you to open this proposal? Everyday work with maui (and previously xamarin).

here is the [XAML binding diagnostics](https://learn.microsoft.com/visualstudio/xaml-tools/xaml-data-binding-diagnostics?view=vs-2022) and output window that should work and it you enable [compiled bindings](https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings) your should even get build time errors. That does something different, or (if you will) only a quite small fraction of it. I'm pretty sure you would see that, if you used it, of looked into MSFTs docs or into the blogpost i've linked.

I think, me (as a mere dev), could not explain it any better than MSFTs own existing documentation.

Further, i'm pretty sure that you, as a skilled senior UI-framework developer at MSFT, have a very deep understanding and expertise of their previous most popular UI frameworks.

TedKerley commented 7 months ago

I would also like to see this implemented. I am trying to resolve a binding issue. There are no errors in the binding errors window. I have enabled compiled bindings and set the data type. Still no errors. My only hope now is to use a DebugDummyConverter as detailed at https://wpf-tutorial.com/data-binding/debugging/. Surely we shouldn't have to go to these lengths.