Skip to content

Debugging no longer adds the root folder to PYTHON_PATH #3340

@AlexandreOuellet

Description

@AlexandreOuellet

Environment data

  • VS Code version: Version:
    1.29.0 (user setup)
    Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
    Date: 2018-11-12T07:47:15.448Z
    Electron: 2.0.12
    Chrome: 61.0.3163.100
    Node.js: 8.9.3
    V8: 6.1.534.41
    Architecture: x64
  • Extension version (available under the Extensions sidebar): 2018.10.1
  • OS and version: Windows 10 enterprise
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5 64 bit with Anaconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: ----

Actual behavior

When debugging from outside of the root folder. imports from the root folder no longer work.
Selecting the text, and doing shift+Enter to execute within a python console work as expected ("python.execSelectionInTerminal")

Expected behavior

I should be able to import package from inside my root folder, even if I start debugging from files in a subdirectory of my root folder.

This behavior was working beofre updating the current version of vscode and python

Steps to reproduce:

  1. clone https://github.com/AlexandreOuellet/vscode-import-bug and open the folder in vscode
  2. open the file tests/test_some_test.py
  3. Debug this file (through F5)

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Starting Jedi Python language engine.
##########Linting Output - pylint##########

--------------------------------------------------------------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)



##########Linting Output - pylint##########

--------------------------------------------------------------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)


Metadata

Metadata

Assignees

Labels

area-debuggingbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions