在Visual Studio代码中使用Python时出现问题
将Python与Visual Studio代码一起使用时,我收到以下错误消息: R:\python>cd R:\python&&cmd/C“set”pythonionecoding=UTF-8“&&set”PYTHONUNBUFFERED=1“&&C:/Program Files(x86)/Python36-32/python.exe“C:\Users\smit097.vscode\extensions\ms python.python-2018.7.1\pythonFiles\pythoontools\visualstudio_py_launcher.py r:\python 50144 34806ad9-833a-4524-8cd6-18ca4aa74f14重定向输出,重定向输出r:\python\testhelloworld.py” “cmd”未被识别为内部或外部命令, 可操作的程序或批处理文件 过了一段时间,出现一个弹出窗口,要求我打开launch.json 只有当我调试并运行新代码时,才会弹出此消息。旧代码运行正常,没有错误在Visual Studio代码中使用Python时出现问题,python,Python,将Python与Visual Studio代码一起使用时,我收到以下错误消息: R:\python>cd R:\python&&cmd/C“set”pythonionecoding=UTF-8“&&set”PYTHONUNBUFFERED=1“&&C:/Program Files(x86)/Python36-32/python.exe“C:\Users\smit097.vscode\extensions\ms python.python-2018.7.1\pythonFiles\pythoont
我尝试卸载并重新安装VSC,但没有成功。打开调试配置
launch.json
,转到
调试->打开配置
在launch.json
中,更改
“控制台”:“集成终端”
至“控制台”:“无”
我也有同样的问题,上面的修复对我有效。你也可以尝试添加
"debugOptions": [
"RedirectOutput"
]
看看它是否适合你
资料来源: