我在调试 VS 代码时遇到问题。我已经为 vs 代码扩展安装了 python 并重新加载了几次。但是当我尝试在调试模式下运行时,出现以下错误
The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled.
我的 launch.json
包含以下内容
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python : Fichier actuel",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
可能是什么问题?
我也有同样的问题。我修复它的最简单方法是:
转到文件资源管理器中的Python文件,
右键单击,然后选择“在交互式窗口中运行当前文件”。
选择之后,VSCODE提示我
我做到了,然后一切都很好!