-
Notifications
You must be signed in to change notification settings - Fork 645
debug: use unique stack frame id #2130
debug: use unique stack frame id #2130
Conversation
Thanks for the PR @xiphon! @brycekahle Given that you had earlier worked in the |
@xiphon I tested this out using the repro provided in the linked issue but it doesn't appear to work, i.e. the value for |
Any chance this is related to Variable Shadowing? |
It is, I thought the intent of the PR was to address it but perhaps I'm mistaken. I had dug into it a bit, delve sends back all the locals including the shadowed ones. E.g.
We send all of them back to VS Code and it would appear that when there are duplicate entries the first one is displayed and the rest discarded (this is just a guess on my part but fits with my observation). |
342bc86
to
3ab1be4
Compare
We are not resetting |
@segevfiner Are you referring to resetting the handles in between 2 debugging sessions or inside a single debugging session? |
Both are an issue technically. During one debug session you keep accumlating handles, and handles from a previous session remain after it ends (Doesn't VS Code close the debug adapter though?) Another point is that changing the thread ID, frame ID might cause VS Code to consider this a new thread which can make it lose focus. I didn't check whether this PR has such an issue or not. |
@segevfiner the debug adapter process is recycled between sessions however you're correct that the number of handles will continue to grow. |
@jhendrixMSFT When investigating another issue, @segevfiner came across documentation for the debug adapter protocol that the stackframe id should be unique across all threads. See #2133 (comment) That's the motivation for @segevfiner's attempt to fix the problem. I believe @xiphon encountered the same when investigating the variable shadowing problem Though, in itself, this PR doesnt fix any user facing issue we are aware of, this bug could be the reason for some other issue in the future (or present) |
Digging into this a bit more we should be resetting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset handle collections to avoid memory leak.
3ab1be4
to
ae145a7
Compare
@jhendrixMSFT you are absolutely correct. Once we stop there, previous handles are no longer valid, |
@xiphon can you rebase against master please. |
ae145a7
to
395f575
Compare
a771e31
to
0be2604
Compare
Co-authored-by: Joel Hendrix <[email protected]>
@OneOfOne |
No description provided.