-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Environment
- OS and version: Ubuntu 20.04
- VS Code: 1.72.2
- C/C++ extension: 1.12.4
- OS and version of remote machine (if applicable):
- GDB / LLDB version: gdb-oneapi
Bug Summary and Steps to Reproduce
I change the state of variables with something like this:
await session.customRequest("evaluate", { expression: "-exec thread "+ newSimdLane, context: "repl"
and then I tried to send the InvalidatedEvent.
Like this:
const session = vscode.debug.activeDebugSession;
if (session) {
await session.customRequest("threads");
let resStackTrace = await session.customRequest('stackTrace', { threadId: 4 })
let frameId = resStackTrace.stackFrames[0].id;
let resID0 = await session.customRequest('evaluate', { expression: 'id0', frameId: frameId });
console.log(resID0.result);
const evalresult = await session.customRequest("evaluate", { expression: "-exec thread 2.1:1", context: "repl" });
if (evalresult.result === 'void') {
return;
}
this.sendEvent(new InvalidatedEvent(['variables']));
resStackTrace = await session.customRequest('stackTrace', { threadId: 4 })
frameId = resStackTrace.stackFrames[0].id;
resID0 = await session.customRequest('evaluate', { expression: 'id0', frameId: frameId });
console.log(resID0.result);
}
According to the logs, I see that the state has changed (it was 8 became 9), however, the event did not help to update the value in the interface:
But, for example, if I add Watch, the view will be updated:

I am sure that the cppdbg adapter monitors changes in the values of variables and should update the panel without additional actions, however, this does not happen so that I do not.
Could you tell me if this is a problem or am I doing something wrong?
@WardenGnaw, @gregg-miskelly, @pieandcakes
Debugger Configurations
{
"configurations": [
{
"name": "(gdb-oneapi) array-transform Launch",
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "",
"postDebugTask": "",
"program": "/array-transform/src/array-transform",
"args": [
"gpu"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "gdb-oneapi",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Disable target async",
"text": "set target-async off",
"ignoreFailures": true
}
],
"logging": {
"engineLogging": true,
"traceResponse": true
}
}
]
}Debugger Logs
--> R (evaluate-23): {"type":"response","request_seq":23,"success":false,"command":"evaluate","message":"Evaluation error","body":{},"seq":1383}
<-- C (threads-24): {"command":"threads","type":"request","seq":24}
--> R (threads-24): {"type":"response","request_seq":24,"success":true,"command":"threads","body":{"threads":[{"id":172521,"name":"array-transform [172521]"},{"id":172533,"name":"array-transform [172533]"},{"id":172539,"name":"array-transform [172539]"},{"id":4,"name":" [4]"},{"id":5,"name":" [5]"},{"id":6,"name":" [6]"},{"id":7,"name":" [7]"},{"id":8,"name":" [8]"},{"id":9,"name":" [9]"},{"id":10,"name":" [10]"},{"id":11,"name":" [11]"},{"id":12,"name":" [12]"},{"id":13,"name":" [13]"},{"id":14,"name":" [14]"},{"id":15,"name":" [15]"},{"id":16,"name":" [16]"},{"id":17,"name":" [17]"},{"id":18,"name":" [18]"},{"id":19,"name":" [19]"}]},"seq":1386}
<-- C (evaluate-25): {"command":"evaluate","arguments":{"expression":"-exec thread","context":"repl"},"type":"request","seq":25}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (11925) <-1081-interpreter-exec console \"thread\"\n"},"seq":1389}
1: (11925) <-1081-interpreter-exec console "thread"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (11925) ->~\"[Current thread is 2.1:0 (Thread 1.32768 lane 0)]\\n\"\n"},"seq":1391}
1: (11925) ->~"[Current thread is 2.1:0 (Thread 1.32768 lane 0)]\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (11925) ->1081^done\n"},"seq":1393}
1: (11925) ->1081^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (11925) ->(gdb)\n"},"seq":1395}
1: (11925) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (11925) 1081: elapsed time 0\n"},"seq":1397}
1: (11925) 1081: elapsed time 0
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Evaluate","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.4.20818.1","VS.Diagnostics.Debugger.HostVersion":"17.4.20818.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Evaluate.Duration":1.0,"VS.Diagnostics.Debugger.Evaluate.IsError":false,"VS.Diagnostics.Debugger.Evaluate.ExecuteInConsole":true}},"seq":1399}
--> R (evaluate-25): {"type":"response","request_seq":25,"success":true,"command":"evaluate","body":{"result":"[Current thread is 2.1:0 (Thread 1.32768 lane 0)]\n","variablesReference":0},"seq":1401}
<-- C (threads-26): {"command":"threads","type":"request","seq":26}
--> R (threads-26): {"type":"response","request_seq":26,"success":true,"command":"threads","body":{"threads":[{"id":172521,"name":"array-transform [172521]"},{"id":172533,"name":"array-transform [172533]"},{"id":172539,"name":"array-transform [172539]"},{"id":4,"name":" [4]"},{"id":5,"name":" [5]"},{"id":6,"name":" [6]"},{"id":7,"name":" [7]"},{"id":8,"name":" [8]"},{"id":9,"name":" [9]"},{"id":10,"name":" [10]"},{"id":11,"name":" [11]"},{"id":12,"name":" [12]"},{"id":13,"name":" [13]"},{"id":14,"name":" [14]"},{"id":15,"name":" [15]"},{"id":16,"name":" [16]"},{"id":17,"name":" [17]"},{"id":18,"name":" [18]"},{"id":19,"name":" [19]"}]},"seq":1404}
<-- C (evaluate-27): {"command":"evaluate","arguments":{"expression":"-exec thread 2.1:1","context":"repl"},"type":"request","seq":27}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16824) <-1082-interpreter-exec console \"thread 2.1:1\"\n"},"seq":1407}
1: (16824) <-1082-interpreter-exec console "thread 2.1:1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16824) ->~\"[Switching to thread 2.1:1 (Thread 1.32768 lane 1)]\\n\"\n"},"seq":1409}
1: (16824) ->~"[Switching to thread 2.1:1 (Thread 1.32768 lane 1)]\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16825) ->~\"#0 main::{lambda(auto:1&)#1}::operator()<cl::sycl::handler>(cl::sycl::handler&) const::{lambda(cl::sycl::id<1>)#1}::operator()(cl::sycl::id<1>) const (this=0x272e6d0, index=cl::sycl::id<1> = {...}) at array-transform.cpp:56\\n\"\n"},"seq":1411}
1: (16825) ->~"#0 main::{lambda(auto:1&)#1}::operator()<cl::sycl::handler>(cl::sycl::handler&) const::{lambda(cl::sycl::id<1>)#1}::operator()(cl::sycl::id<1>) const (this=0x272e6d0, index=cl::sycl::id<1> = {...}) at array-transform.cpp:56\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16826) ->~\"56\\t int element = in[index]; // breakpoint-here\\n\"\n"},"seq":1413}
1: (16826) ->~"56\t int element = in[index]; // breakpoint-here\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16827) ->=thread-selected,id=\"4\",frame={level=\"0\",addr=\"0x00000000fffc5940\",func=\"main::{lambda(auto:1&)#1}::operator()<cl::sycl::handler>(cl::sycl::handler&) const::{lambda(cl::sycl::id<1>)#1}::operator()(cl::sycl::id<1>) const\",args=[{name=\"this\",value=\"0x272e6d0\"},{name=\"index\",value=\"cl::sycl::id<1> = {...}\"}],file=\"array-transform.cpp\",fullname=\"/home/sergey/samples/array-transform/src/array-transform.cpp\",line=\"56\",arch=\"intelgt\"}\n"},"seq":1415}
1: (16827) ->=thread-selected,id="4",frame={level="0",addr="0x00000000fffc5940",func="main::{lambda(auto:1&)#1}::operator()<cl::sycl::handler>(cl::sycl::handler&) const::{lambda(cl::sycl::id<1>)#1}::operator()(cl::sycl::id<1>) const",args=[{name="this",value="0x272e6d0"},{name="index",value="cl::sycl::id<1> = {...}"}],file="array-transform.cpp",fullname="/home/sergey/samples/array-transform/src/array-transform.cpp",line="56",arch="intelgt"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16827) ->1082^done\n"},"seq":1417}
1: (16827) ->1082^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16827) ->(gdb)\n"},"seq":1419}
1: (16827) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (16827) 1082: elapsed time 2\n"},"seq":1421}
1: (16827) 1082: elapsed time 2
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Evaluate","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.4.20818.1","VS.Diagnostics.Debugger.HostVersion":"17.4.20818.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Evaluate.Duration":3.0,"VS.Diagnostics.Debugger.Evaluate.IsError":false,"VS.Diagnostics.Debugger.Evaluate.ExecuteInConsole":true}},"seq":1423}
--> R (evaluate-27): {"type":"response","request_seq":27,"success":true,"command":"evaluate","body":{"result":"[Switching to thread 2.1:1 (Thread 1.32768 lane 1)]\n#0 main::{lambda(auto:1&)#1}::operator()<cl::sycl::handler>(cl::sycl::handler&) const::{lambda(cl::sycl::id<1>)#1}::operator()(cl::sycl::id<1>) const (this=0x272e6d0, index=cl::sycl::id<1> = {...}) at array-transform.cpp:56\n56\t int element = in[index]; // breakpoint-here\n=thread-selected,id=\"4\",frame={level=\"0\",addr=\"0x00000000fffc5940\",func=\"main::{lambda(auto:1&)#1}::operator()<cl::sycl::handler>(cl::sycl::handler&) const::{lambda(cl::sycl::id<1>)#1}::operator()(cl::sycl::id<1>) const\",args=[{name=\"this\",value=\"0x272e6d0\"},{name=\"index\",value=\"cl::sycl::id<1> = {...}\"}],file=\"array-transform.cpp\",fullname=\"/home/sergey/samples/array-transform/src/array-transform.cpp\",line=\"56\",arch=\"intelgt\"}\n","variablesReference":0},"seq":1425}Other Extensions
No response
Additional Information
No response
Reactions are currently unavailable
