Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

debug: Display nested content in the variables pane #2198

Merged
merged 6 commits into from
Jan 28, 2019
Merged

debug: Display nested content in the variables pane #2198

merged 6 commits into from
Jan 28, 2019

Conversation

jhendrixMSFT
Copy link
Member

If a variable contains children but they have not been loaded issue an
expression command to delve to fetch them, then update the variable's
children array with the result. This required refactoring the
evaluateRequest method into two parts so that delve expressions can be
evaluated synchronously.
Removed unreferenced param in convertDebugVariableToProtocolVariable.

@jhendrixMSFT
Copy link
Member Author

Fixes #1010

If a variable contains children but they have not been loaded issue an
expression command to delve to fetch them, then update the variable's
children array with the result. This required refactoring the
evaluateRequest method into two parts so that delve expressions can be
evaluated synchronously.
Removed unreferenced param in convertDebugVariableToProtocolVariable.
@jhendrixMSFT
Copy link
Member Author

@ramya-rao-a FYI

@ramya-rao-a
Copy link
Contributor

@jhendrixMSFT Great job! I have 2 main concerns here

  • We are now sending parallel requests to delve to evaluate contents of the array. Do we know if delve is able to handle concurrent requests like this?
  • These requests to delve will be sent even if there is nothing to expand. For example, take an array of strings. When the user expands that variable, the evaluate request will be sent of each string in the array. Can we somehow not send these requests based on the type of the array or map value?

@jhendrixMSFT
Copy link
Member Author

@ramya-rao-a are the requests in parallel? My intention was to perform them synchronously. Good point on the spurious evaluations on strings, I will update loadChildren() to never perform the eval if the type is string.

Log error if evaluation fails.
@jhendrixMSFT jhendrixMSFT changed the title Display nested content in the variables pane debug: Display nested content in the variables pane Jan 23, 2019
@ramya-rao-a
Copy link
Contributor

Good point on the spurious evaluations on strings, I will update loadChildren() to never perform the eval if the type is string.

Its not just when the variable itself is a string. This also applies to array of strings, numbers or any of the primitive types. These would not need further evaluations.
Same applies to maps. When the value in the key/value pair of the map is a simple string or number or other primitive type, we dont need further evaluation.

@jhendrixMSFT
Copy link
Member Author

I found a great description of when to load children here. Will update based on this spec.

@ramya-rao-a ramya-rao-a merged commit 3390051 into microsoft:master Jan 28, 2019
@jhendrixMSFT jhendrixMSFT deleted the debugger1010 branch January 28, 2019 17:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants