You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mono WASM debugger displays private members of base class alongside other properties #43184
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.
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.
Other information
Install the above version of the SDK.
Create a new Blazor WASM project with .NET 5 in VS's project creation view.
Click F5.
Set a breakpoint in the IncrementCount method in the Counter.razor page and observe the issue.
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
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 ?
Activity
captainsafia commentedon Oct 8, 2020
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).
danroth27 commentedon Oct 8, 2020
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.
[-]Mono WASM debugger displays private members of base class[/-][+]Mono WASM debugger displays private members of base class alongside other properties[/+]thaystg commentedon Oct 9, 2020
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
privatePropertiesarray, but this is experimental, or we could just don't send, what do you prefer, @lewing ?lewing commentedon Oct 14, 2020
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.
lewing commentedon Jul 31, 2021
@thaystg Is this also a VS settings issue? Maybe we should create a tracking issue.
ilonatommy commentedon Jul 12, 2022
This work is blocked by:
publicmembers in VS)Then we should make sure inherited members are popped into the right group:
resultorprivate.