How to make code navigation work for a Python project in VSCode

393 Views Asked by At

I have locally cloned the Tensorflow github project https://github.com/tensorflow/tensorflow

I am using VSCode since it seems to be the recommended IDE. One feature that will make it easier for me to explore the code is "click to navigate" (i.e when I click on function it navigates to its definition).

Currently click to navigate works if function is in the same file but not if the definition is in another file. How do I make this work on VSCode?

1

There are 1 best solutions below

0
MingJie-MSFT On

In vscode, even if you only open a single file, the target file of navigation can be navigated successfully in the same folder by using shortcuts F12 or Ctrl+Click.

You can read document about Go to Definition.

I think the only possibility is that you haven't installed the Python extension.

You can also read the Python-tutorial for more details.