简体   繁体   English

Go 到 Python 中的定义 Microsoft 扩展在模块中不起作用

[英]Go to Definition in Python Microsoft Extension is not working in modules

I have installed我已经安装

  • Python 2.7 Python 2.7
  • Visual Studio Code 1.471.视觉工作室代码 1.471。
  • Python Extension 2020.6.91350 Python 扩展 2020.6.91350

While Go to definitions works within same module, but if we import some other module, Go to definition don't work虽然 Go 到定义在同一个模块中工作,但是如果我们导入其他模块,Go 到定义不起作用

Any idea what can be solution for this?知道什么可以解决这个问题吗?

TL;DR: Your language server might not be opening up properly because vscode version is not up to date. TL;DR:您的语言服务器可能无法正常打开,因为 vscode 版本不是最新的。 This goes to all languages这适用于所有语言

If your symptoms include如果您的症状包括

  1. Type >Python: Show output in vscode console >Python: Show output
  2. Restart vscode and open any python file重启vscode并打开任意python文件
  3. In the output if you see any line saying something close to Error: cant't start language server because vscode version low在 output 中,如果您看到任何行说接近Error: cant't start language server because vscode version low

You need your vscode updated to latest version.您需要将 vscode 更新到最新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM