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

Improve debugger experience #27017

Merged
merged 8 commits into from
Jan 26, 2025
Merged

Conversation

pictos
Copy link
Contributor

@pictos pictos commented Jan 8, 2025

Description of Change

This PR adds the DebuggerDisplay attribute over a good amount of controls and, this is the first step into improving the debug experience of .NET MAUI
image

You can find more images in the related issue

Issues Fixed

Related to #27016

@pictos pictos requested a review from a team as a code owner January 8, 2025 23:10
@pictos pictos requested review from rmarinho and jsuarezruiz January 8, 2025 23:10
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 8, 2025
@jfversluis
Copy link
Member

jfversluis commented Jan 9, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

jfversluis
jfversluis previously approved these changes Jan 9, 2025
Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor things. But this little optimization makes me happy!

Thanks for putting this together Pedro!

@jfversluis jfversluis added the area-architecture Issues with code structure, SDK structure, implementation details label Jan 9, 2025
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do things like commands look? Also, maybe we should also do events for Button. HasClicked = (Clicked is not null)

Copy link

Azure Pipelines successfully started running 3 pipeline(s).


private protected override string GetDebuggerDisplay()
{
return $"IsRunning = {IsRunning}, " + base.GetDebuggerDisplay();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interpolating along with string concatenation ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it cause any issue?

Copy link
Contributor

@MartyIX MartyIX Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it cause any issue?

Typically one uses one or the other for consistency reasons, not both. I think one can do:

$"IsRunning = {IsRunning}, {(base.GetDebuggerDisplay())}";

Copy link
Contributor

@dartasen dartasen Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String concatenation should never be used in modern c#

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis
Copy link
Member

@pictos this needs a rebase for a failing UI test and not sure you want to address the feedback? For consistency might be nice

@pictos
Copy link
Contributor Author

pictos commented Jan 12, 2025

@jfversluis I can do a rebase during the week. I can use just the interpolated string, but I don't see any issue on that

@pictos pictos force-pushed the pj/improve-debugger-display branch from d0d0713 to 3507b52 Compare January 15, 2025 22:36
@PureWeen
Copy link
Member

PureWeen commented Jan 15, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis self-assigned this Jan 25, 2025
@jfversluis jfversluis force-pushed the pj/improve-debugger-display branch from 3507b52 to efc36b0 Compare January 26, 2025 12:38
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis merged commit 4504a68 into dotnet:main Jan 26, 2025
316 checks passed
@jfversluis jfversluis added this to the .NET 9 SR4 milestone Jan 26, 2025
@pictos pictos deleted the pj/improve-debugger-display branch January 27, 2025 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-architecture Issues with code structure, SDK structure, implementation details community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants