-
Notifications
You must be signed in to change notification settings - Fork 174
Description
Environment data
Vscode about
Version: 1.56.0-insider
Commit: 8aff878db2542eea2dfb571c8bb485118bbb3113
Date: 2021-04-19T05:14:11.109Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Linux x64 5.8.0-49-generic
Other system info
- Extension version (available under the Extensions sidebar): v2021.5.756443519-dev
- OS and version: Ubuntu 20.04
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.8 64-bit
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Conda
- Relevant/affected Python packages and their versions: standard library
- Relevant/affected Python-related VS Code extensions and their versions: ptvsd
- Value of the
python.languageServersetting: Pylance
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
I am unable to store string variables that contain a double underscore when I am debugging a process. I understand that starting a python class attribute __ causes name mangling but here I just simply try to store two underscores (see gif below). The code works fine when it is executed outside the debugger.
Actual behaviour
The debugger returns None and no variable is created.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Debug the following python script.
test = "__test"
print(test)
test2 = test.strip("__")
print(test2)
print("script ended")- Place a debug point on line 5.
- Type
test3="__test"into the debug console. - Type
test4="test__test"into the debugger. - In both cases note that no variables are created.
