No definition found(when open vscode.app)
See original GitHub issueI’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:
- Install python plugin and config:
"python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
- Open /Applications/Visual\ Studio\ Code.app
- create a simple file to test go to definition.
Logs
There is no logs output. The following is Screen Shot of Develop Tool:
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After I update python-language-server, the problem seems to gone. https://github.com/Microsoft/python-language-server/issues/875#event-2277618550
@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 anotherpipenv install
i was back up and running.@ahuigo I don’t know if this was your issue ^