Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always picks up ptvsd from extensions directory #2818

Closed
karthiknadig opened this issue Oct 8, 2018 · 0 comments
Closed

Always picks up ptvsd from extensions directory #2818

karthiknadig opened this issue Oct 8, 2018 · 0 comments
Labels
area-debugging feature-request Request for new features or functionality

Comments

@karthiknadig
Copy link
Member

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:

  1. git clone https://github.com/Microsoft/ptvsd in C:\
  2. In launch.json set "env": {"PYTHONPATH":"C:\\ptvsd"},
  3. Use this test code:
import ptvsd
print(ptvsd.__file__)
  1. Output should be: C:\ptvsd\ptvsd\__init__.py

Solution

Change ptvsd_launcher.py to append the extension path to sys.path instead of inserting.

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality needs PR area-debugging labels Oct 8, 2018
DonJayamanne pushed a commit that referenced this issue Oct 9, 2018
* For #2818
* Change from insert to launch
* Add news entry
@lock lock bot locked as resolved and limited conversation to collaborators Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants