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
Allow modifying global variables from the variables panel #1857
changed the title [-]Global variables set from "Variables" moved to locals on Step[/-][+]Allow modifying global variables from the variables panel[/+]on Mar 5, 2025
Activity
rchiodo commentedon Mar 5, 2025
I believe this is by design. It sets the value of 'c' in the local frame. This code here:
debugpy/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py
Line 522 in 96de437
If you want to force an eval to change a global, you have to do something like so:
Andrej730 commentedon Mar 5, 2025
But shouldn't it be not changable from UI or appear show it as local variable right away to prevent confusion?
Or it's https://github.com/microsoft/vscode-python-debugger issue?
rchiodo commentedon Mar 5, 2025
I agree it's confusing. Right now the logic for eval doesn't take into account the parent of the value.
We do get the 'parent' for the variable though, so maybe we can tell that it's coming from the global list.
Reopening as an enhancement request.
[-]Global variables set from "Variables" moved to locals on Step[/-][+]Allow modifying global variables from the variables panel[/+]rchiodo commentedon Mar 5, 2025
Here's the request in this example:
And you can see in the scopes request, that variables reference 4 is 'globals':