microsoft / microsoft/PTVS

IntelliSense for Search Paths doesn't work when import folder outside the workspace.

Open
#7,828 7 comments 0 reactions 1 assignee View on GitHub

@AdamYoblick is already working on this.

Since Feb 17, 2024.

bug
Dominant language
C#
Stars
2.6k
Forks
680
Avg merge
39m
Merged PRs (30d)
1

Description

Environment
image

Steps to Reproduce

  1. Open a folder as workspace in SE.
  2. Add new python file in SE named WholsRunningMe.py.
  3. Select a python environment from the python toolbar to open PythonSettings.json and you can check “Show All Files” on the toolbar to reveal local settings.
  4. Create a folder named folder1 in your local, such like : C:\Users\vyizh12\source\repos\python-azure-web-app-cookiecutter\folder1
  5. Add init.py in folder1 and type some code in __init__.py
    def FOLDER1_MSG(): print("hello world!")
  6. Add searchpaths in PythonSettings.json.
    image
  7. Type code below in WholsRunningMe.py
import folder1
folder1.FOLDER1_MSG()
  1. Make sure IntelliSense should show squiggles on the import statement

Expected behavior
Make sure IntelliSense should show when import statement

Additional context and screenshots
No IntelliSense when import folder1
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.