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
In microsoft/vscode#134450 it was discussed how to support variables that are expensive/have side-effects and can be lazily evaluated.
Since DAP's variable request is inherently lazy, it is already possible to support lazy evaluation of expensive variables by introducing an intermediate variable with exactly one child. Expanding this variable in the client UI will trigger the "lazy evaluation" of the value by fetching the single child.
The only problem with this approach is that the intermediate variable makes the UI more noisy by introducing an additional node in the variables tree. To address this, we agreed to introduce a "presentation hint" on a variable that tells a client to render the variable in a way that reduces the noise.
So the proposal is to add an optional boolean flag lazy on the VariablePresentationHint type.
The text was updated successfully, but these errors were encountered:
But it's not a "presentation hint" though really is it? It's more like the "expensive" flag on the scope ?
Clients are free to ignore presentation hints I believe and if adapters start putting stuff in there that has material value (such as not causing side-effects), I think it should have more prominence.
@puremourning existing DAs are using the mechanism already without the "lazy" flag and without additional client support. See microsoft/vscode#134450 (comment).
Introducing the "lazy" flag affects only the presentation and is optional.
Oh I see. The suggestion is to keep the additional variable in the hierarchy, but add a hint to say "this is a fake variable to save evaluating it". Got it. Thanks.
In microsoft/vscode#134450 it was discussed how to support variables that are expensive/have side-effects and can be lazily evaluated.
Since DAP's
variable
request is inherently lazy, it is already possible to support lazy evaluation of expensive variables by introducing an intermediatevariable
with exactly one child. Expanding this variable in the client UI will trigger the "lazy evaluation" of the value by fetching the single child.The only problem with this approach is that the intermediate
variable
makes the UI more noisy by introducing an additional node in the variables tree. To address this, we agreed to introduce a "presentation hint" on a variable that tells a client to render the variable in a way that reduces the noise.So the proposal is to add an optional boolean flag
lazy
on theVariablePresentationHint
type.The text was updated successfully, but these errors were encountered: