You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds the memoryReference field for the DAP variables request.
Other requests returning the memoryReference field have not been implemented yet.
Use Case
I am programming a visualization tool that recursively traverses variables. The memoryReference field is used to detect if a variable has already been queried and must not be queried again.
TODO
Only send memoryReference field if client announces supportsMemoryReferences
Add/Update Tests
Determine if this PR should also implement the memoryReference field for
setVariable request
evaluate request
setExpression request
These TODOs are currently not implemented because they are not required for my use case.
Please let me know whether the project is interested in adding this functionality, and if so, to what extent it should be implemented so it can be upstreamed.
I am worry about memoryReference usage itself. The point is - now debugger could guaranty that memoryReference in your changes is valid only before any managed code execution, since managed code execution could trigger GC that could move not pinned objects to another memory location. This mean, that during break (before continue or step) runtime also may invalidate memoryReference by any code execution (for example, during another expression evaluation, property's getter execution or even just object fields analyze that force debugger to execute static constructor).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the
memoryReferencefield for the DAPvariablesrequest.Other requests returning the
memoryReferencefield have not been implemented yet.Use Case
I am programming a visualization tool that recursively traverses variables. The
memoryReferencefield is used to detect if a variable has already been queried and must not be queried again.TODO
memoryReferencefield if client announcessupportsMemoryReferencesmemoryReferencefield forsetVariablerequestevaluaterequestsetExpressionrequestThese TODOs are currently not implemented because they are not required for my use case.
Please let me know whether the project is interested in adding this functionality, and if so, to what extent it should be implemented so it can be upstreamed.