Skip to content

[wasm][debugger] Fix member type in static structures #68539

Closed

Description

When we get static structure members from the runtime, type information etype in the buffer is always "17" (valueType), no matter what the real type of the member is.

ElementType etype = (ElementType)retDebuggerCmdReader.ReadByte();

Because of this, we are not able to correctly create objects on the debugger side and one of its consequences is erroneous value in ["value"]["className"] and ["value"]["description"]. For non-static structures and non-static/static classes the problem does not exist, types are granted correctly.

How to reproduce in tests:
take EvaluateBrowsableNone and add two scenarios for EvaluateBrowsableStaticStruct that is the same as existing EvaluateBrowsableStaticClass but a structure. One scenario should be for fields, the other for auto-properties.

Result:
all testNoneProps elements are valueType objects with incorrect description and classNames.

Expected behavior:
testNoneProps elements should be the same as for isCustomGetter = false scenarios.

After it's fixed, add these two cases to all the other EvaluateBrowsable* tests and additionally EvaluateBrowsableCustomPropertiesStruct scenario can be added, that is nearly the same as EvaluateBrowsableCustomPropertiesClass but a structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions