Skip to content

[wasm][debugger] RootHidden is not working correctly in DebuggerTypeProxy #76876

Closed

Description

@thaystg
var list = new List<string>();
var a = "test";
list.Add(a);

On wasm:
image
In a console app:
image

Items is DebuggerRootHidden, so I think it should not show.

When fixed, remove else block from:

else
{
// a collection - expose elements to be of array scheme
var memberNamedItems = members
.Where(m => m["name"]?.Value<string>() == "Items" || m["name"]?.Value<string>() == "_items")
.FirstOrDefault();
if (memberNamedItems is not null &&
(DotnetObjectId.TryParse(memberNamedItems["value"]?["objectId"]?.Value<string>(), out DotnetObjectId itemsObjectId)) &&
itemsObjectId.Scheme == "array")
{
rootObjectId = itemsObjectId;
}
}

Activity

  1. added this to the 8.0.0 milestone on Oct 11, 2022
  2. added
    arch-wasm
    on Oct 11, 2022
  3. ilonatommy commented on Oct 19, 2022

    @ilonatommy
    Member

    We don't have access to external code's DebuggerHidden, probably because of trimming.
    In the case with a list you suggested:

    {
      "type": "object",
      "value": null,
      "description": "Count = 1",
      "className": "System.Collections.Generic.List<string>",
      "objectId": "dotnet:object:2"
    }
    

    after calling getProperties we are getting an info about the list's type correctly: System.Collections.Generic.ICollectionDebugView<string>. We have access to its properties, we can see it has a member Items. For Items we are getting only one element in CustomAttributeHandleCollection and it's of MethodDefinition kind. It belongs to the default constructor .ctor.

    For sure for aggressive trimming switched on, we have some problems with Debugger Attrs - #57588.

  4. modified the milestones: 8.0.0, 9.0.0 on Aug 7, 2023
  5. added
    enhancement
    on Mar 4, 2024
  6. modified the milestones: 9.0.0, Future on Apr 25, 2024
  7. thaystg commented on Aug 6, 2024

    @thaystg
    MemberAuthor

    This is fixed by the new debugger.

  8. locked and limited conversation to collaborators on Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Debugger-monoenhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions