Skip to content

Improve variable path handling #233

@TwitchBronBron

Description

@TwitchBronBron

Currently we use evaluateName to store the actual expression used to look up the value, which sometimes has the temp vars generated by execute commands. We should actually store 3 different properties for each variable.

  • evaluateName - will store the full expression (something the user would run from the REPL to get to the value themselves)
  • executeExpression - the expression the debugger would use to get to the variable in the shortest path for the debugger (using temp var, etc)
  • variablePath the path actually used to look up the variable. This is after any evaluateToTempVar actions have run.

Here are some examples:

m.top =>
    evaluateName: "m.top"
    executeExpression: "m.top"
    variablePath: "m.top"

m.top.$children => 
    evaluateName: "m.top.getChildren(-1, 0)"
    executeExpression:  "m.top.getChildren(-1, 0)"
    variablePath: "temp1" 

    [0].$children => 
        evaluateName: "m.top.getChildren(-1, 0)[0].getChildren(-1, 0)"
        executeExpression: "temp1[0].getChildren(-1,0)"
        variablePath = "temp2"

        [0].id => 
        evaluateName: "m.top.getChildren(-1, 0)[0].getChildren(-1, 0)[0].name"
        executeExpression: "temp2[0].name"
        variablePath = "temp2.0.name"


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions