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

watch doesn’t show reference variables. #1

Closed
phoityne opened this issue Jun 14, 2018 · 2 comments
Closed

watch doesn’t show reference variables. #1

phoityne opened this issue Jun 14, 2018 · 2 comments

Comments

@phoityne
Copy link
Owner

phoityne commented Jun 14, 2018

Visual Studio does not send EvaluateRequest when adding local variable to watch,

vs

  • when adding watch.
    VS sends ScopesRequest and VariablesRequest.
[REQUEST] ScopesRequest {seqScopesRequest = 15, typeScopesRequest = "request", commandScopesRequest = "scopes", argumentsScopesRequest = ScopesArguments {frameIdScopesArguments = 0}}
[RESPONSE]{"seq":36,"type":"response","request_seq":15,"success":true,"command":"scopes","message":"","body":{"scopes":[{"name":"GHCi Scope","variablesReference":1,"namedVariables":null,"indexedVariables":null,"expensive":false}]}}
[REQUEST] VariablesRequest {seqVariablesRequest = 16, typeVariablesRequest = "request", commandVariablesRequest = "variables", argumentsVariablesRequest = VariablesArguments {variablesReferenceVariablesArguments = 1}}
[RESPONSE]{"seq":37,"type":"response","request_seq":16,"success":true,"command":"variables","message":"","body":{"variables":[{"name":"_result","value":"_","type":"IO ()","presentationHint":null,"evaluateName":"_result","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"foo","value":"_","type":"Foo","presentationHint":null,"evaluateName":"foo","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"bar","value":"_","type":"Bar","presentationHint":null,"evaluateName":"bar","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"zig","value":"_","type":"Zig","presentationHint":null,"evaluateName":"zig","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"zag","value":"_","type":"Zag","presentationHint":null,"evaluateName":"zag","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"hoge","value":"_","type":"(Float, [Char], Int)","presentationHint":null,"evaluateName":"hoge","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"huga","value":"_","type":"[Int]","presentationHint":null,"evaluateName":"huga","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"func","value":"function :: Int -> Int -> Int","type":"Int -> Int -> Int","presentationHint":null,"evaluateName":"func","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"fizz","value":"_","type":"FizzBuzz","presentationHint":null,"evaluateName":"fizz","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"buzz","value":"_","type":"FizzBuzz","presentationHint":null,"evaluateName":"buzz","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"fuga","value":"_","type":"Map [Char] FizzBuzz","presentationHint":null,"evaluateName":"fuga","variablesReference":0,"namedVariables":null,"indexedVariables":null}]}}

but VSCode does.
vs

  • when adding watch.
    VSCode sends EvaluateRequest.
[REQUEST] EvaluateRequest {seqEvaluateRequest = 17, typeEvaluateRequest = "request", commandEvaluateRequest = "evaluate", argumentsEvaluateRequest = EvaluateArguments {expressionEvaluateArguments = "zag", frameIdEvaluateArguments = Just 0, contextEvaluateArguments = Just "watch"}}
[RESPONSE]{"seq":38,"type":"response","request_seq":17,"success":true,"command":"evaluate","message":"","body":{"result":"Zag :: String -> Int -> Zag","type":"Zag","presentationHint":null,"variablesReference":3,"namedVariables":null,"indexedVariables":null}}
  • when opening tree node.
    VSCode sends VariablesRequest.
[REQUEST] VariablesRequest {seqVariablesRequest = 18, typeVariablesRequest = "request", commandVariablesRequest = "variables", argumentsVariablesRequest = VariablesArguments {variablesReferenceVariablesArguments = 3}}
[RESPONSE]{"seq":39,"type":"response","request_seq":18,"success":true,"command":"variables","message":"","body":{"variables":[{"name":"nameZag","value":"\"zag\"","type":"String","presentationHint":null,"evaluateName":"zag","variablesReference":0,"namedVariables":null,"indexedVariables":null},{"name":"yearZag","value":"2017","type":"Int","presentationHint":null,"evaluateName":"zag","variablesReference":0,"namedVariables":null,"indexedVariables":null}]}}

@phoityne phoityne changed the title watch doesn’t work watch doesn’t show reference variables. Jun 14, 2018
@phoityne
Copy link
Owner Author

going to use reference attribute of VariablesRequest for the local variables.
as a result, all information (including child) of the inspected variable is shown in the local variable tree view.

vs_modified

@phoityne
Copy link
Owner Author

fixed 0.0.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant