【问题标题】:Python Extension for visual studio code not showing error or warning messagesVisual Studio 代码的 Python 扩展不显示错误或警告消息
【发布时间】:2021-03-20 14:51:37
【问题描述】:
当我在 visual studio 代码编辑器 上编写 python 代码时,我找不到任何 警告 或 错误 >。
我安装了 python 扩展,
我还更改了该扩展程序的 版本 ..
我还阅读了许多有关 python 扩展和 Visual Studio 的文档,但找不到任何解决方案
Here is the image...
【问题讨论】:
标签:
python
visual-studio-code
python-extensions
【解决方案1】:
您可以使用 Python 代码分析工具“Pylint”或在 VS Code 中使用“Microsoft”或“Pylance”语言服务。
-
Python代码分析工具“Pylint”。
请在VS Code当前使用的Python环境中安装模块“pylint”并启用其使用设置。
Linting Python in Visual Studio Code.
-
使用“Microsoft”或“Pylance”语言服务。
请在“settings.json”中使用:
"python.languageServer": "Microsoft",`
或
"python.languageServer": "Pylance",
之前:
之后: