-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Threads window is not updated after each call to threadsRequest() #19858
Comments
Digging into this issue, it seems that the threads display is updated correctly if the response to |
@adelphes so you are saying that VSCode is sending a Does call stack view nicely update if you send 'ThreadEvent' instead? Since you can send this event any time you want. Just to be on the safe side please read how vscode is expecting that the debug adapter is handling threads here How hard would it be to setup a reproducable sample so we can try this out on our side? |
I've now fixed this issue in my adaptor, so I think it can probably be closed. I was (asynchronously) retrieving thread information from the Android device on each call to In any case, I've updated my adaptor to actively monitor thread creation/exit and send the appropriate |
@adelphes got it. Thanks for providing an explanation. |
@isidorn, so is ThreadEvent mandatory? I understand that without it, VSCode won't know about newly spawned threads while the program is running. But one has received a This used to work (without sending ThreadEvents) for a while, but I've noticed that this is no longer the case (as of v1.15.1). If I don't send a "thread created" event for each new thread, they don't show up in the callstack pane. |
Yes, only the threads whose tids were ever mentioned in StoppedEvent are shown in the UI. This used to be the case a while back, then VSCode was changed to display all threads returned by ThreadsRequest, so I stopped sending ThreadEvents to reduce chatter. But now it seems to be back to old ways again. I can put sending ThreadEvents back, if that's what the spec says. |
"Thread events are optional but a debug adapter can send them to force VS Code to update the threads UI dynamically even when not in a stopped state" So, yes they are optional. @vadimcn please file a new issue regarding the problem you outlined in the comments above. And mention me on it. |
The threads display is not being correctly updated after a call to
threadsRequest()
.I'm working on adding multi-threading support to the Android debugging extension and after the initial call, I'm finding that the threads shown in the UI rarely correspond to the return values from the call to
threadsRequest()
. In particular, newly created threads are not displayed and deleted threads remain even though they are no longer in theThreadsResponse
body.This may be related to the ongoing thread-handling discussion in #40 but this does appear to be a distinct problem in the current build.
The text was updated successfully, but these errors were encountered: