-
Notifications
You must be signed in to change notification settings - Fork 171
Open
Labels
Fixed in next releaseThis issue has been fixed, but won't be available to customers until the next release.This issue has been fixed, but won't be available to customers until the next release.enhancementNew feature or requestNew feature or request
Description
Environment data
- debugpy version: 1.8.13
- OS and version: Windows 11
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.7
- Using VS Code or Visual Studio: VS Code 1.93.1
Actual behavior
Cursor_z3UFWwrl0Y.mp4
Expected behavior
To either prohibit editing global variable in that case as it's not editable or actually edit it.
Steps to reproduce:
- Set breakpoint at
b = 35
in the snippet below and run it. - Attach to Python using debugger.
- Change
c
value inVariables
section to1000
. - Step Over (F10), global variable is moved to locals and global variable value is reset.
What I've also noticed that if on step 3 I run globals()['c']
in Debug Console, it prints 0
and Variables are reset as we would be on the step 4.
c = 0
def main():
a = 25
import debugpy
debugpy.listen(5678)
debugpy.wait_for_client()
b = 35
print(a + b + c)
if __name__ == "__main__":
main()
Metadata
Metadata
Assignees
Labels
Fixed in next releaseThis issue has been fixed, but won't be available to customers until the next release.This issue has been fixed, but won't be available to customers until the next release.enhancementNew feature or requestNew feature or request