Vscode: Watch pane does not use evaluateName when executing "Copy Value"

Created on 23 Jul 2018  ·  3Comments  ·  Source: microsoft/vscode

I've had a bug raised where values copied (using Copy Value) from the Watch pane are truncated. I investigated, and it seems like there is a difference in behaviour between the Variables and Watch panes. I'm examining an array with a single long string in it:

screen shot 2018-07-23 at 9 42 59 am

In both the scopesRequest and the evaluateRequest I return a variablesReference for the array. In the variablesRequest they both return the same data, which is the following (an array of Variable):

[
    {
        "evaluateName": "longStrings[0]",
        "indexedVariables": null,
        "name": "[0]",
        "type": "String (_OneByteString)",
        "value": "\"This is a long string that is 300 characters! This is a long string that is 300 characters! This is a long string that is 300 ch…\"",
        "variablesReference": 0
    }
]

This has a truncated string for display, and an evaluateName that will give the full string. However it seems that when I chooseCopy Value from the Variables window the expression gets evaluated, but choosing Copy Value from the Watch window just copies the truncated value into the clipboard.

screen shot 2018-07-23 at 9 47 44 am

(@isidorn does this seem like a bug, or are they intended to work differently?)

bug debug verified

All 3 comments

You are right, this is an issue and I can push a fix for it by passing variable instead of variable.value here

However this seems to uncover another bug from node-debug. Which is that the evaluateName for variables in watch window are bogus. @weinand @roblourens can you please investigate? Or if you prefer i can push a fix for this issue which will uncover the other issue

I pushed a fix for the evaluateName issue.

@roblourens great than I will push a fix for this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DovydasNavickas picture DovydasNavickas  ·  3Comments

biij5698 picture biij5698  ·  3Comments

borekb picture borekb  ·  3Comments

lukehoban picture lukehoban  ·  3Comments

vsccarl picture vsccarl  ·  3Comments