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:
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.
(@isidorn does this seem like a bug, or are they intended to work differently?)
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!