microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
273 stars 79 forks source link

Debug protocol extension: support obtaining the full value for a string variable #33

Closed gregg-miskelly closed 8 years ago

gregg-miskelly commented 8 years ago

To be able to use the debug protocol in other IDEs (Visual Studio, Xamarin Studio) or possibly VS Code in the future we should think about how the debug protocol should support large strings. Currently the debug adapter can clip strings, but if the UI has a facility for showing the full string (in VS this is done through a 'string visualizer' see image) the debug protocol doesn't support a way of obtaining this 'raw' string.

stringvisualizer

Suggestion:

weinand commented 8 years ago

@gregg-miskelly VS Code uses already an 'evaluate' request to retrieve the raw value of a string (e.g. for the 'Copy value' action).

gregg-miskelly commented 8 years ago

@weinand we need some way to differentiate a normal expression evaluation from a request to get the full string value. It doesn't matter for small strings, but if we have a several megabyte string, one doesn't necessarily want to fetch that by default.

weinand commented 8 years ago

@gregg-miskelly a variableReference only exists for structured variables but not for simple (=leaf) variables. So an API would require both a variableReference of the parent and the name of the variable within its parent.

weinand commented 8 years ago

Starting with debug protocol v1.14.0 we've introduced a new attribute evaluateName on the Variable type. This can be used to access the raw value via an evaluate request.