-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
- debugpy version: 1.6.3 (run
import debugpy; print(debugpy.__version__)if uncertain) - OS and version: MacOS X Ventura 13.0.1
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.13, miniconda 3
- Using VS Code or Visual Studio: VS Code Version: 1.73.1 (Universal)
Actual behavior
In Debug Console
del xis ignored.x = Nonedoesn't create an object.
Expected behavior
del xshould delete the object.x = Noneshould create an object withNonevalue.
Steps to reproduce:
- Create dummy script with just
and place a breakpoint on that line
import sys
- Start debugging session using remote -SSH extension on server running Linux CentOS Stream 8, with Microsoft Python extension and following
launch.json. The script{ "version": "0.2.0", "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "cwd": "${workspaceFolder}/bin", "program": "${file}", "console": "integratedTerminal", "redirectOutput": true, "justMyCode": true, "env": {"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT": "2"} } ] } - Go to Debug Console
- Create variable
x=5 - Print variable
print(x). This shows5 - Delete variable
del x. - Print deleted variable
print(x). This still shows5. Even afterimport gc; gc.collect(),xstill exists. - Create new variable with
Nonevalue.y = None - Print new variable
print(y). This produces the errorTraceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'y' is not defined - However, if a previously defined variable is assigned
None, e.g.x = None, then the variable is still defined.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working