Skip to content

Mono WASM debugger displays private members of base class alongside other properties #43184

Closed

Description

@captainsafia

Description

When debugging a Blazor WASM application on .NET 5 RC2, I noticed that the debugger populates the locals inspector with private properties from the ComponentBase base class.

Screen Shot 2020-10-08 at 12 12 11 PM

The extraneous values displayed are private book-keeping properties used by Blazor's base component class (ref). The class is defined as a public abstract class.

Configuration

  • .NET 5 RC 2 (5.0.0-rc.2.20475.17)
  • Windows 10
  • Visual Studio 16.8 Preview 3

Regression?

This looks like a regression from 3.2. Setting a breakpoint at the same point in a 3.2 app does not surface the issue.

Screen Shot 2020-10-08 at 12 13 40 PM

Other information

  1. Install the above version of the SDK.
  2. Create a new Blazor WASM project with .NET 5 in VS's project creation view.
  3. Click F5.
  4. Set a breakpoint in the IncrementCount method in the Counter.razor page and observe the issue.

Activity

  1. added
    arch-wasmWebAssembly architecture
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Oct 8, 2020
  2. captainsafia commented on Oct 8, 2020

    @captainsafia
    Author

    Update: It looks like we just need to make sure the UX displays them under "Non-public members" as in the example below (Blazor Server app).

    Screen Shot 2020-10-08 at 12 32 46 PM

  3. danroth27 commented on Oct 8, 2020

    @danroth27
    Member

    Yeah, in general I think being able to see non-public members is desirable new functionality, but maybe we can do something to improve the UX.

  4. changed the title [-]Mono WASM debugger displays private members of base class[/-] [+]Mono WASM debugger displays private members of base class alongside other properties[/+] on Oct 8, 2020
  5. added this to the 6.0.0 milestone on Oct 9, 2020
  6. thaystg commented on Oct 9, 2020

    @thaystg
    Member

    Okay, the problem here is:
    With Just My Code enabled, the private members from inherited classes which are not user classes, are showed inside the non-public-members.
    With Just My Code disabled, the private members from inherited classes which are or are not user classes, are showed in the same way as public members.
    Imagining that Just My Code is enabled and I have this information as it's expected on #42816, we can try to send the private properties from a non user class in privateProperties array, but this is experimental, or we could just don't send, what do you prefer, @lewing ?

  7. lewing commented on Oct 14, 2020

    @lewing
    Member

    I think we should stick with the current code for net5.0 but we are in urgent need of a way to communicate settings to the proxy.

  8. lewing commented on Jul 31, 2021

    @lewing
    Member

    @thaystg Is this also a VS settings issue? Maybe we should create a tracking issue.

  9. modified the milestones: 6.0.0, 7.0.0 on Jul 31, 2021
  10. ilonatommy commented on Jul 12, 2022

    @ilonatommy
    Member

    This work is blocked by:

  11. modified the milestones: 7.0.0, 8.0.0 on Aug 11, 2022
  12. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 16, 2022
  13. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 16, 2022
  14. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 16, 2022
  15. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 17, 2022
  16. ghost locked as resolved and limited conversation to collaborators on Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions