Skip to content

Python Debugger is overiding PYTHONPATH #2509

@tkuraku

Description

@tkuraku

Environment 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:

  1. Set the PYTHONPATH variable to something
  2. debug a script with the follow code:
import sys
print(sys.path)

You should not see the path that you set in the PYTHONPATH

Metadata

Metadata

Assignees

Labels

area-debuggingbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions