question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellisense and Code navigation fails in New language when using package names

See original GitHub issue

Environment data

  • VS Code version: Insiders
  • Extension version (available under the Extensions sidebar): Master
  • OS and version: Mac
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A

Actual behavior

  • Code navigation does not work
  • Intellisense does not work

Expected behavior

Code navigation should work.

Steps to reproduce:

  1. Open an empty folder in VSC
  2. Create a folder mypkg1
  3. Add empty __init__.py and __main__.py files in the above mypkg1 dir
  4. Add a file named bar.py in the above directory with the following contents:
def do_something():
   pass
  1. Create a file named foo.py in the above directory with the following contents:
from mypkg1.bar import do_something


do_something()
  1. Note, while typing from mypkg1. there’s no auto completion (intellisense). This works in Jedi.
  2. Try to go to definition of do_something, will not go into bar.py file.
  3. Notice the squigglies under mymod1.bar.
  4. Message in Problems window is [Python (analysis)] Unable to resolve 'mymod1.bar'. IntelliSense may be missing for this module.

This works in Jedi, both intellisense and code navigation.

FYI - This was identified while working on PTVSD.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
leandrorebelocommented, Aug 15, 2018

I have the same problem.

The vscode and language server are updated.

vscode version: 1.25.1 Architecture: x64

4reactions
PEKTOPcommented, Aug 15, 2018

I have the same problem.

Version: 1.26.0
Commit: 4e9361845dc28659923a300945f84731393e210d
Date: 2018-08-13T16:25:59.521Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
Read more comments on GitHub >

github_iconTop Results From Across the Web

IntelliSense in Visual Studio Code
This issue is caused by missing type declaration (typings) files in JavaScript. You can check if a type declaration file package is available...
Read more >
Visual Studio Code: Intellisense not working - Stack Overflow
Solution: Configure the path to the python executable in settings.json . Remember to restart vscode after. The module is located in a non- ......
Read more >
Configure a C++ project for IntelliSense - Microsoft Learn
Learn how to manually configure your C++ project to get IntelliSense working properly by using the Visual Studio IDE to help you identify ......
Read more >
Integrating Code Completion in Visual Studio Code - Strumenta
Integrating Code Completion in Visual Studio Code – With the Language ... with features such as code completion, error detection, navigation, and others....
Read more >
Code completion | PyCharm Documentation - JetBrains
Techniques to accelerate the editing process in PyCharm using code ... Invoking Basic code completion for the second time shows the names of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found