New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy value please specify the context. #69768
Comments
I've created a protocol change request to address this issue. |
@actboy168 looking at the code Copy Value shuold pass the @weinand If this is not enough we should look into this so debug authors could distungish between copy value and other evaluations potentially needed for #73845 |
Thank you,
|
|
@actboy168 that is probably because the other variable do not have the |
Each item is provided with evaluateName, this is the json of the DA response. {
"command":"variables",
"request_seq":20,
"type":"response",
"seq":27,
"body":{
"variables":[
{
"namedVariables":64,
"evaluateName":"_G._G",
"name":"_G",
"type":"table",
"variablesReference":19,
"value":"{_G=...,_VERSION='Lua 5.4',arg=...,...}",
"indexedVariables":1
},
{
"evaluateName":"_G._VERSION",
"name":"_VERSION",
"type":"string",
"variablesReference":0,
"value":"'Lua 5.4'"
},
{
"namedVariables":4,
"evaluateName":"_G.arg",
"name":"arg",
"type":"table",
"variablesReference":20,
"value":"{'4711',-1='local path=[[c:/...',-2='-e',...}",
"indexedVariables":2
},
{
"evaluateName":"_G.assert",
"name":"assert",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.collectgarbage",
"name":"collectgarbage",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"namedVariables":8,
"evaluateName":"_G.coroutine",
"name":"coroutine",
"type":"table",
"variablesReference":23,
"value":"{close=func,create=func,isyieldable=func,...}",
"indexedVariables":1
},
{
"namedVariables":32,
"evaluateName":"_G.debug",
"name":"debug",
"type":"table",
"variablesReference":11,
"value":"{debug=func,gethook=func,getinfo=func,...}",
"indexedVariables":1
},
{
"evaluateName":"_G.dofile",
"name":"dofile",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.error",
"name":"error",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.getmetatable",
"name":"getmetatable",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"namedVariables":16,
"evaluateName":"_G.io",
"name":"io",
"type":"table",
"variablesReference":12,
"value":"{close=func,flush=func,input=func,...}",
"indexedVariables":1
},
{
"evaluateName":"_G.ipairs",
"name":"ipairs",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.load",
"name":"load",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.loadfile",
"name":"loadfile",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"namedVariables":32,
"evaluateName":"_G.math",
"name":"math",
"type":"table",
"variablesReference":21,
"value":"{abs=func,acos=func,asin=func,atan=func,...}",
"indexedVariables":1
},
{
"evaluateName":"_G.next",
"name":"next",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"namedVariables":16,
"evaluateName":"_G.os",
"name":"os",
"type":"table",
"variablesReference":17,
"value":"{clock=func,date=func,difftime=func,...}",
"indexedVariables":1
},
{
"namedVariables":8,
"evaluateName":"_G.package",
"name":"package",
"type":"table",
"variablesReference":14,
"value":"{config='\\\n;\n?\n!\n-\n',cpath='D:\\work\\vscode-l...',...}",
"indexedVariables":1
},
{
"evaluateName":"_G.pairs",
"name":"pairs",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.pcall",
"name":"pcall",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.print",
"name":"print",
"type":"c function",
"variablesReference":18,
"value":"C function"
},
{
"evaluateName":"_G.rawequal",
"name":"rawequal",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.rawget",
"name":"rawget",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.rawlen",
"name":"rawlen",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.rawset",
"name":"rawset",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.require",
"name":"require",
"type":"c function",
"variablesReference":22,
"value":"C function"
},
{
"evaluateName":"_G.select",
"name":"select",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.setmetatable",
"name":"setmetatable",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"namedVariables":32,
"evaluateName":"_G.string",
"name":"string",
"type":"table",
"variablesReference":15,
"value":"{byte=func,char=func,dump=func,find=func,...}",
"indexedVariables":1
},
{
"namedVariables":8,
"evaluateName":"_G.table",
"name":"table",
"type":"table",
"variablesReference":16,
"value":"{concat=func,insert=func,move=func,...}",
"indexedVariables":1
},
{
"evaluateName":"_G.tonumber",
"name":"tonumber",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.tostring",
"name":"tostring",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.type",
"name":"type",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"namedVariables":8,
"evaluateName":"_G.utf8",
"name":"utf8",
"type":"table",
"variablesReference":13,
"value":"{char=func,charpattern='[-��-�][�-�]*',...}",
"indexedVariables":1
},
{
"evaluateName":"_G.warn",
"name":"warn",
"type":"c function",
"variablesReference":0,
"value":"C function"
},
{
"evaluateName":"_G.xpcall",
"name":"xpcall",
"type":"c function",
"variablesReference":0,
"value":"C function"
}
]
},
"success":true
} |
We have changed the watches view to be consistent now wer will always have the copy value, you can try it with vscode insiders @weinand will push a change to the protocol such that we can set a different context when doing a copy value. See microsoft/debug-adapter-protocol#29. |
I've created another AP feature request to document the |
VSCode is now respecting the |
In the WATCH view, |
@actboy168 correct that is still how we behave. We can change this though, @weinand thoughts? |
@isidorn Since "Copy to clipboard" must result in the same value in REPL, VARIABLES and WATCHES view we should use the same EvaluateRequest in all cases. |
@weinand makes sense. |
@actboy168 is this now behaving better for you? Asking because we would like to add a verified label here if possible. |
Yes, it works fine now. |
Great, thanks for letting us know. Adding verified label. |
https://github.com/Microsoft/debug-adapter-protocol/blob/gh-pages/debugAdapterProtocol.json#L1964-L1973
The copy value is implemented using EvaluateRequest. But now
context
is null. If VSCode can provide an enum for the copy value, the DA will be able to optimize it.The text was updated successfully, but these errors were encountered: