Environment data
- VS Code version: 1.27.1
- Extension version (available under the Extensions sidebar): master
- OS and version: windows
- Python version (& distribution if applicable, e.g. Anaconda): any
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
- Relevant/affected Python packages and their versions: XXX
Actual behavior
Setting PYTHONPATH has no effect while ptvsd.
Expected behavior
Should import ptvsd from current path first.
Steps to reproduce:
git clone https://github.com/Microsoft/ptvsd in C:\
- In launch.json set
"env": {"PYTHONPATH":"C:\\ptvsd"},
- Use this test code:
import ptvsd
print(ptvsd.__file__)
- Output should be:
C:\ptvsd\ptvsd\__init__.py
Solution
Change ptvsd_launcher.py to append the extension path to sys.path instead of inserting.
Environment data
Actual behavior
Setting
PYTHONPATHhas no effect whileptvsd.Expected behavior
Should import
ptvsdfrom current path first.Steps to reproduce:
git clone https://github.com/Microsoft/ptvsdinC:\"env": {"PYTHONPATH":"C:\\ptvsd"},C:\ptvsd\ptvsd\__init__.pySolution
Change
ptvsd_launcher.pytoappendthe extension path tosys.pathinstead ofinserting.