Python Debugger is overiding PYTHONPATH
See original GitHub issueEnvironment data
- VS Code version: 1.27.1
- Extension version (available under the Extensions sidebar): 2018.8.0
- OS and version: Windows 7
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda 5.2
Actual behavior
When I debug a python file in vscode my PYTHONPATH variable is overridden.
here is the relevant line shown on the terminal.
set “PYTHONPATH=c:\Users\username.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd”
Expected behavior
I would expect the PYTHONPATH to be appended to not overridden.
Steps to reproduce:
- Set the PYTHONPATH variable to something
- debug a script with the follow code:
import sys
print(sys.path)
You should not see the path that you set in the PYTHONPATH
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Right click -> Debug breaks PYTHONPATH : PY-42951
Right click -> Debug breaks PYTHONPATH ... with the PYTHONPATH in a way that submodules of my test module accidentally override the core...
Read more >pdb — The Python Debugger — Python 3.11.1 documentation
Note that internal pdb commands can be overridden by aliases. Such a command is then hidden until the alias is removed. Aliasing is...
Read more >Conda and Visual Studio Code debugging - python
Override the parameter python.venvPath with the Path to folder with a list of Virtual Environments. For the case of anaconda:.
Read more >Using Python environments in VS Code
You can override this behavior by specifying a different path in the python property of a debug configuration. See Choose a debugging environment....
Read more >Advanced Visual Studio Code for Python Developers
Debugging Your Python Scripts in Visual Studio Code ... To override an existing binding, right-click on the existing action and click Change Keybinding....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I try to roll back to before version, i can start debugging code
I was able to verify that my PYTHONPATH env var shows up in
sys.path
in a debugged program.