I am importing a module foo
found in the same directory as my importing Python script.
src/proj
\_ main.py
|_ foo.py
However, there is a foo installed in /usr/local/lib/python3.6/site-packages
as well.
When I try to use VSCode to jump to a method defined in foo
("go to definition", F12
), nothing happens (because the system instance of foo
does not have such a method). If I hover over the import itself and go to definition, I end up in the system foo
(which is a directory containing __init__.py
and the rest of the module contents).
How can I force VSCode to use my foo.py
for the "go to definition/declaration/etc." actions instead of the system foo
? (I believe the correct Python interpreter is configured.)
I've tried adding '.'
to extraPaths
(Python), but that did not help. I even tried adding '.'
to the beginning of sys.path
, which also did not seem to help.
Note that I am editing remotely via SSH.