vscode stack frameId can get out of sync
paulo-fernando-silva opened this issue · comments
When the user selects a stack frame, vscode will send a scopesRequest
which contains the selected frameId
. Then, it seems vscode caches the variables in that scope, but if the user selects a previous scope no event is sent informing of this change.
In my case this becomes a problem when evaluating hover expressions. This is because it's likely the user wants to evaluate a variable in the scope of last stack frame he selected. Since vscode doesn't share the info of the current selected frame id, all expressions will be evaluated against the scope of the most recent cached stack frame, independently of it being the selected frame.
If this is "the way it should work", how does one get the current selected stack frame id?
Thank you.
I just found out that evaluateRequest
has a parameter called DebugProtocol.EvaluateArguments.frameId
which fixes my issue. Great.