skip to Main Content

Switched to visualcode(Version: 1.53.1) recently for Python(2.7.5 is the interpreter). Set up remote-ssh(localclient – OSX and remote machine – CentOS 7) and i am able to write and execute code without issues. It’s a pretty big code base and the directory structure looks like below. I tried opening both src/ and main/ but the "Go to Definition" or "Go to references" would not work – it just says "Nothing is found".

It works if its under the same directory for some cases – for example the reference and definition in d22 might only be listed when i am searching in d22 but that does not work always either.

src

  • main
    • d1
    • d2
      • d22

Tried the following but nothing is helping:

  • Uninstalled all extensions except standard Python extension
  • Reinstalled Visual Code
  • Have set {{fs.inotify.max_user_watches = 524288}} and reloaded the conf since it initially showed too many files error.
  • Closed vscode and opened it multiple times.

I also want to know if we have something like Kite that will work over remote ssh.

2

Answers


  1. I noticed that the extension you used is "Python for VSCode". In VS Code, the "Go to Definition" and "Go to references" functions are provided by the "Python" extension. It is recommended that you install it or try to reinstall it if you have already installed it.

    for the methods in the module:

    enter image description here

    for custom methods:

    before "Go to Definition":

    enter image description here

    after "Go to Definition":

    enter image description here

    For remote development using SSH in VS Code, you could refer to this docs: Remote Development using SSH.

    Login or Signup to reply.
  2. Not sure if you solved this problem, but as of now, for me, I had the same problem, but when I go check out the Python extension in VS Code, there is a warning that "code navigation is disabled in this workspace" when it is remote. It suggested that I need to install the same extension in the remote in order to enable that functionality, which I could do with one click. After that, it works fine.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search