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
[wasm][debugger] Object members that are protected accessors are not displayed in debugger window even though proxy is informed about them #75778
When we switch off property level sorting the item is returned fine.
For a normal, user-code non-overridden protected members the problem does not exist.
For a user-code overridden protected members the problem is there as well, so it's not connected with JMC.
public class MyObject
{
public int publicVar => 0;
internal int internalVar => 1;
protected int protectedVar => 2;
private int privateVar => 3;
}
private void IncrementCount()
{
var testMe = new MyObject(); // NOT OK
}
We can't have tests for it because the Debugger Proxy response is correct and contains all 4 members.
changed the title [-][wasm][debugger] protected override property not showing in inspector[/-][+][wasm][debugger] Object members that are protected accessors are not displayed in debugger window even though proxy is informed about them[/+]on Sep 20, 2022
The reason:
while grouping the members by protection level we were populating internalProperties part of response with internal/protected members. In fact, internalProperties does not correspond with C#'s protection level internal and describes only properties in the js code that are not acessible to the programmer. When debugging a simple js class:
we can see that protected member is returned along with public member - in results: . In this issue we should remove populating internalProperties and move its contents to result.
Activity
ilonatommy commentedon Sep 20, 2022
Current behavior - no internal members:

while in the reply we are including them:
When we switch off property level sorting the item is returned fine.
For a normal, user-code non-overridden protected members the problem does not exist.
For a user-code overridden protected members the problem is there as well, so it's not connected with JMC.
ilonatommy commentedon Sep 20, 2022
Mininal repro:
We can't have tests for it because the Debugger Proxy response is correct and contains all 4 members.
Proxy's response is fine:
[-][wasm][debugger] protected override property not showing in inspector[/-][+][wasm][debugger] Object members that are protected accessors are not displayed in debugger window even though proxy is informed about them[/+]ilonatommy commentedon Sep 20, 2022
The reason:

. In this issue we should remove populating
while grouping the members by protection level we were populating
internalPropertiespart of response with internal/protected members. In fact,internalPropertiesdoes not correspond with C#'s protection levelinternaland describes only properties in the js code that are not acessible to the programmer. When debugging a simple js class:we can see that protected member is returned along with public member - in
results:internalPropertiesand move its contents toresult.