You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To extract the threadId, I use the following code in my extension:
public onDidSendMessage(m: DebugProtocol.ProtocolMessage) {
this.routeDebugMessage(m);
}
private routeDebugMessage(m: DebugProtocol.ProtocolMessage): void {
if (m.type === "event") {
const e = m as DebugProtocol.Event;
switch (e.event) {
case "stopped": {
const threadID = e.body?.threadId as number;
// ... other operations
}
}
}
The C++ code for my breakpoint is:
// ... some code ...
int main(int argc, char *argv[]) {
constexpr size_t length = 32;
// ... other code ...
}
In this context, I received a value of 18888 for threadId instead of the expected 1 as shown by the -exec info threads command:
Id Target Id Frame
* 1 Thread 0x7ffff59b15c0 (LWP 18888) "array-transform" main (argc=..., argv=...) at array-transform.cpp:27
From my observations, it seems that the LWP (Light-Weight Process) value is being used instead of the actual thread ID, leading to potential confusion and issues.
The threadId in the Stopped event should match the actual thread ID as per the Debug Adapter Protocol's specification.
Actual Behavior:
The threadId in the Stopped event is reflecting the LWP value instead of the actual thread ID.
Additional Context:
The observed behavior can lead to potential issues and confusion, especially when there's a reliance on accurate thread ID values for debugging purposes.
The text was updated successfully, but these errors were encountered:
@WardenGnaw Could you assist me in understanding and resolving this issue, or suggest someone else I might turn to? This problem seems quite pervasive and effects navigation across all extensions that rely on the 'stopped' events
Description:
In the Debug Adapter Protocol's specification for the Stopped event, the threadId is described as "The thread which was stopped." However, I've encountered an inconsistency between the specified threadId and the actual ID of the thread.
To extract the threadId, I use the following code in my extension:
The C++ code for my breakpoint is:
In this context, I received a value of 18888 for threadId instead of the expected 1 as shown by the -exec info threads command:
From my observations, it seems that the LWP (Light-Weight Process) value is being used instead of the actual thread ID, leading to potential confusion and issues.
This discrepancy is also visible in the MI log:
Expected Behavior:
The threadId in the Stopped event should match the actual thread ID as per the Debug Adapter Protocol's specification.
Actual Behavior:
The threadId in the Stopped event is reflecting the LWP value instead of the actual thread ID.
Additional Context:
The observed behavior can lead to potential issues and confusion, especially when there's a reliance on accurate thread ID values for debugging purposes.
The text was updated successfully, but these errors were encountered: