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.

No definition found(when open vscode.app)

See original GitHub issue

I’ve searched google and github for this issue. But I do not find the key to fix this issue.

Environment data

With Python 3.7.2 installed:

vscode 1.32.3 
Mac Mojave 10.14
pylint 2.3.1
astroid 2.2.5
Python 3.7.2 (default, Feb 12 2019, 08:15:36)

➜ pydemo$ code --list-extensions --show-versions
batisteo.vscode-django@0.19.0
donjayamanne.jupyter@1.1.5
donjayamanne.python-extension-pack@1.4.0
magicstack.MagicPython@1.1.0
ms-python.python@2019.3.6215
ms-vscode.Go@0.9.2
ms-vsliveshare.vsliveshare@0.3.1403
msjsdiag.debugger-for-chrome@4.11.3
mushan.vscode-paste-image@1.0.4
Shan.code-settings-sync@3.2.7
tht13.python@0.2.3
VisualStudioExptTeam.vscodeintellicode@1.1.5
vscodevim.vim@1.3.0
wholroyd.jinja@0.0.8
yzane.markdown-pdf@1.2.0
yzhang.markdown-all-in-one@2.2.0

I’ve set the interpreter:

{
     "python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
}

Expected behaviour

Go to denifition successfully

Actual behaviour

I find that if I open code cli from Iterm2 or terminal . The code works well with go to definition. (vscode will analyze project with 100% cpu usage at the same time)

$ '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code'

If I open vscode.app through dock or terminal or iterm2, vscode will not analyze my project, and vscode will say No definition found for ...

$ open /Applications/Visual\ Studio\ Code.app

Steps to reproduce:

  1. Install python plugin and config: "python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
  2. Open /Applications/Visual\ Studio\ Code.app
  3. create a simple file to test go to definition. Apr-02-2019 14-34-41

Logs

There is no logs output. The following is Screen Shot of Develop Tool: image image image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
ahuigocommented, Apr 23, 2019

After I update python-language-server, the problem seems to gone. https://github.com/Microsoft/python-language-server/issues/875#event-2277618550

1reaction
mplachtercommented, Apr 18, 2019

@karrtikr No worries I totally for got about this. I actually found my issue on this.

I updated my Python from 3.7.1 to 3.7.3 and my pipenv symlinks broke which vscode was using. After a quick

pipenv --rm and another pipenv install i was back up and running.

@ahuigo I don’t know if this was your issue ^

Read more comments on GitHub >

github_iconTop Results From Across the Web

No definition found for function - VSCode Python
For Python v3. 9.0 I am getting No definition found if I try to seek a function definition. However, I do not get...
Read more >
Go to definition says "no definition found for 'whatever'" - Reddit
I'm new to VSCode. Do my projects need to be saved in a "Workspace?" I tend to just 'Open folder' when I start...
Read more >
Remote Development FAQ - Visual Studio Code
No ports need to be publicly opened beyond those used by these well-known, secure transports. The VS Code Server that is injected runs...
Read more >
Visual Studio Code and Unity
You need to ensure that your solution is open in VS Code (not just a single file). Open the folder with your solution...
Read more >
Documentation for Visual Studio Code
Find out how to set-up and get the most from Visual Studio Code. Optimized for building and debugging modern web and cloud applications....
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