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
{{ message }}
Repository navigation
Explicit String Variables (e.g. ${variable}) do not resolve in debugging #4878
Debugging it reveals that hovering over "${module}" is processed by the hover handler (which just gets the symbol details and returns that it's a variable with the name module) and hovering over "$module" actually goes through the code lens handler.
I think what's going on is that, while debugging, VS Code automatically looks up the values of symbols on hover if they are variables. So $module is recognized as a variable because of its symbol type, but ${module} is not (it's an expression). I actually plumbed in logic to evaluate variables on hover and it works like you'd expect (though I haven't fixed up the formatting).
So like when I have all LSP messages getting logged, when not debugging I see a hover request go across for both ${module} and $module, but when debugging I only see a hover request go across for ${module}, there is no request being sent for $module which is what makes me think VS Code is doing a client-side lookup for the variable's value based on the already known list of variables and their values (since the debugger is stopped).
Activity
andyleejordan commentedon Jan 4, 2024
Ok so the good news is that we know how to do this correctly, since watch expressions are evaluated as intended:

andyleejordan commentedon Jan 4, 2024
Debugging it reveals that hovering over
"${module}"is processed by the hover handler (which just gets the symbol details and returns that it's a variable with the namemodule) and hovering over"$module"actually goes through the code lens handler.andyleejordan commentedon Jan 4, 2024
To be continued...
andyleejordan commentedon Jan 5, 2024
I think what's going on is that, while debugging, VS Code automatically looks up the values of symbols on hover if they are variables. So
$moduleis recognized as a variable because of its symbol type, but${module}is not (it's an expression). I actually plumbed in logic to evaluate variables on hover and it works like you'd expect (though I haven't fixed up the formatting).So like when I have all LSP messages getting logged, when not debugging I see a hover request go across for both
${module}and$module, but when debugging I only see a hover request go across for${module}, there is no request being sent for$modulewhich is what makes me think VS Code is doing a client-side lookup for the variable's value based on the already known list of variables and their values (since the debugger is stopped).