Skip to content
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

[wasm][debugger] Support multidimensional indexing of object scheme #76062

Closed
Tracked by #90587
ilonatommy opened this issue Sep 23, 2022 · 1 comment · Fixed by #92630
Closed
Tracked by #90587

[wasm][debugger] Support multidimensional indexing of object scheme #76062

ilonatommy opened this issue Sep 23, 2022 · 1 comment · Fixed by #92630
Assignees
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Milestone

Comments

@ilonatommy
Copy link
Member

In MemberReferenceResolver.cs we are throwing

throw new InvalidOperationException($"Cannot apply indexing with [,] to an object of type '{type}'");

Remove it and fix it for e.g. testcase:

        [Fact]
        public async Task EvaluateObjectIndexingMultidimensional() => await CheckInspectLocalsAtBreakpointSite(
            "DebuggerTests.EvaluateLocalsWithIndexingTests", "EvaluateLocals", 12, "DebuggerTests.EvaluateLocalsWithIndexingTests.EvaluateLocals",
            "window.setTimeout(function() { invoke_static_method ('[debugger-test] DebuggerTests.EvaluateLocalsWithIndexingTests:EvaluateLocals'); })",
            wait_for_event_fn: async (pause_location) =>
           {
               var id = pause_location["callFrames"][0]["callFrameId"].Value<string>();

               await EvaluateOnCallFrameAndCheck(id,
                   ("f[\'a\', \'&\']", TString("a-&"))
                );
           });
public class TestEvaluate
{
    public string this[char key1, char key2] => $"{key1}-{key2}";
}

and similar. Make sure that not only numeric indexes are supported but other schemes (as above: char) as well.

@ilonatommy ilonatommy added arch-wasm WebAssembly architecture area-Debugger-mono labels Sep 23, 2022
@ilonatommy ilonatommy added this to the 8.0.0 milestone Sep 23, 2022
@ilonatommy ilonatommy self-assigned this Sep 23, 2022
@ghost
Copy link

ghost commented Sep 23, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

In MemberReferenceResolver.cs we are throwing

throw new InvalidOperationException($"Cannot apply indexing with [,] to an object of type '{type}'");

Remove it and fix it for e.g. testcase:

        [Fact]
        public async Task EvaluateObjectIndexingMultidimensional() => await CheckInspectLocalsAtBreakpointSite(
            "DebuggerTests.EvaluateLocalsWithIndexingTests", "EvaluateLocals", 12, "DebuggerTests.EvaluateLocalsWithIndexingTests.EvaluateLocals",
            "window.setTimeout(function() { invoke_static_method ('[debugger-test] DebuggerTests.EvaluateLocalsWithIndexingTests:EvaluateLocals'); })",
            wait_for_event_fn: async (pause_location) =>
           {
               var id = pause_location["callFrames"][0]["callFrameId"].Value<string>();

               await EvaluateOnCallFrameAndCheck(id,
                   ("f[\'a\', \'&\']", TString("a-&"))
                );
           });
public class TestEvaluate
{
    public string this[char key1, char key2] => $"{key1}-{key2}";
}

and similar. Make sure that not only numeric indexes are supported but other schemes (as above: char) as well.

Author: ilonatommy
Assignees: ilonatommy
Labels:

arch-wasm, area-Debugger-mono

Milestone: 8.0.0

@ilonatommy ilonatommy modified the milestones: 8.0.0, 9.0.0 Aug 7, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 26, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant