Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow modifying global variables from the variables panel

Open
#1,857 4 comments 0 reactions 1 assignee View on GitHub

@judej is already working on this.

Since Mar 5, 2025.

Assessment

This issue has not been assessed yet.

Description

enhancement Fixed in next release

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.

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()

Dominant language
Python
Stars
2.5k
Forks
202
Avg merge
5d 1h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/debugpy

All issues in microsoft/debugpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.