## 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 https://github.com/user-attachments/assets/9ec3ca67-de5c-4ab7-a35b-905840013559 ## Expected behavior To either prohibit editing global variable in that case as it's not editable or actually edit it. ## Steps to reproduce: 1. Set breakpoint at `b = 35` in the snippet below and run it. 2. Attach to Python using debugger. 3. Change `c` value in `Variables` section to `1000`. 4. 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. ```python 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() ```
Environment data
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:
b = 35in the snippet below and run it.cvalue inVariablessection to1000.What I've also noticed that if on step 3 I run
globals()['c']in Debug Console, it prints0and Variables are reset as we would be on the step 4.