Skip to content

Scoped variables not working for non-local variables #11

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

Open
fflaten opened this issue Jun 4, 2022 · 3 comments
Open

Scoped variables not working for non-local variables #11

fflaten opened this issue Jun 4, 2022 · 3 comments

Comments

@fflaten
Copy link
Contributor

fflaten commented Jun 4, 2022

Global and script scoped variables are not looked up properly by vscode. Always show value of local variable.

image

@fflaten
Copy link
Contributor Author

fflaten commented Jun 4, 2022

The correct values are shown in the variable explorer under script and global.
image
Looks like we're just missing away to reference the scope in InlineValueVariableLookup()

Should we ignore variables with global and script scope until we can resolve them correctly? High risk of wrong values being shown.

@fflaten fflaten changed the title Scoped variables not working for non-local value Scoped variables not working for non-local variables Jun 4, 2022
@fflaten
Copy link
Contributor Author

fflaten commented Jun 7, 2022

This could probably also be solved with vscode.InlineValueEvaluatableExpression(), but at a perf penalty. Would require #8 to minimize impact.

Running everything as expressions gave 123 at line 5 in OP image for some reason. Looks like the evaluateexpression might not be executing at the same scope/frame as debugger.

@fflaten
Copy link
Contributor Author

fflaten commented Aug 12, 2022

Running everything as expressions gave 123 at line 5 in OP image for some reason. Looks like the evaluateexpression might not be executing at the same scope/frame as debugger.

PowerShell/PowerShellEditorServices#1882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant