-
Notifications
You must be signed in to change notification settings - Fork 5k
[wasm][debugger] Hide members from classes that don't have debug information #73982
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
Conversation
Tagging subscribers to this area: @thaystg Issue DetailsDo not show members from classes that don't have debug information if JMC is enabled. Fixes #43184
|
var typeInfo = await sdbHelper.GetTypeInfo(containerTypeId, token); | ||
if (typeInfo.Info.IsNonUserCode && getCommandOptions.HasFlag(GetObjectCommandOptions.JustMyCode)) | ||
return fieldValues; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be at line 215?
@@ -591,6 +594,11 @@ JObject GetNotAutoExpandableObject(int methodId, string propertyName, bool isSta | |||
if (!getCommandType.HasFlag(GetObjectCommandOptions.WithProperties)) | |||
return GetMembersResult.FromValues(allMembers.Values, sortByAccessLevel); | |||
|
|||
var typeInfo = await sdbHelper.GetTypeInfo(typeId, token); | |||
|
|||
if (typeInfo.Info.IsNonUserCode && getCommandType.HasFlag(GetObjectCommandOptions.JustMyCode)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this add fields for non-my-code types? Should it moved to the beginning of the loop?
System.Diagnostics.Debugger.Break(); | ||
} | ||
|
||
public int myField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add custom, and autogenerated properties too.
I'm not sure I understand. Is this correct? :
Also, this won't completely fix #43184, because this is still not returning the non-public members in |
Other than the comments here, and some from discussion offline, this LGTM, assuming the tests pass 👍 |
var typeInfo = await sdbHelper.GetTypeInfo(typeId, token); | ||
|
||
if (typeInfo.Info.IsNonUserCode && getCommandType.HasFlag(GetObjectCommandOptions.JustMyCode)) | ||
break; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be right after int typeId = typeIdsIncludingParents[I];
.
src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs
Outdated
Show resolved
Hide resolved
src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs
Outdated
Show resolved
Hide resolved
@@ -63,6 +64,7 @@ | |||
|
|||
<WasmAssemblySearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)native"/> | |||
<WasmAssemblySearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)lib\$(NetCoreAppCurrent)"/> | |||
<WasmAssemblySearchPaths Include="$(OutDir)"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this needed?
Co-authored-by: Ankit Jain <radical@gmail.com>
/backport to release/7.0-rc1 |
Started backporting to release/7.0-rc1: https://github.com/dotnet/runtime/actions/runs/2871012035 |
Do not show members from classes that don't have debug information if JMC is enabled.
Fixes #43184