Visual Studio代码:Intellisense无法正常工作 [英] Visual Studio Code: Intellisense not working

查看:372
本文介绍了Visual Studio代码:Intellisense无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Visual Studio代码的Intellisense无法正常工作。每次我尝试通过 Ctrl + Shift 使用它时,它仅显示一条加载消息。我正在使用Python(与Django一起使用),并已安装 ms-python.python 。我也有 Djaneiro 。它仍然无法正常工作。

My Visual Studio Code's Intellisense is not working properly. Every time I try to use it with Ctrl + Shift, it only displays a loading message. I'm using Python (with Django) and have installed ms-python.python. I also have Djaneiro. It is still not working.

这里似乎是什么问题?

推荐答案

这可能是由多种原因引起的,其中一些原因如下。

This can be caused by many reasons, some of them are as follows.


  1. Python vscode中的可执行文件路径不正确

  1. Python executable path in vscode is incorrect


  • 解决方案:在 settings.json 中配置python可执行文件的路径。记住要在之后重新启动vscode。

  • Solution: Configure the path to the python executable in settings.json. Remember to restart vscode after.

该模块位于非标准位置


  • 解决方案:配置 settings.json 使其包含此位置,以便自动完成工作。用于向工作空间添加自定义模块的示例(对于Linux):

  • Solution: Configure settings.json to include this location for autocompletion to work. An example (for Linux) used to add a custom module for the workspace:

{
  "python.pythonPath": "/usr/bin/python",
  "python.autoComplete.extraPaths": [
    "${workspaceFolder}/customModule"
  ]
}



vscode并非从活动的虚拟环境中启动

vscode was not launched from the active virtual environment


  • 解决方案:在以下情况下设置模块的路径虚拟环境已激活。从已激活正确虚拟环境的终端启动vscode

这篇关于Visual Studio代码:Intellisense无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆