python - 在 Visual Studio Code 中使用 Python 时出现问题
问题描述
在将 Python 与 Visual Studio Code 结合使用时,我收到以下错误消息:
R:\python>cd r:\python && cmd /C "set "PYTHONIOENCODING=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\PythonTools\visualstudio_py_launcher.py r:\python 50144 34806ad9-833a-4524-8cd6-18ca4aa74f14 RedirectOutput,RedirectOutput r:\python\testhelloworld .py"
'cmd' 不是内部或外部命令、可运行程序或批处理文件。
一段时间后有一个弹出窗口要求我打开launch.json。
仅当我调试并运行新代码时才会弹出此消息。旧代码运行良好,没有错误。
我尝试卸载并重新安装 VSC,但没有运气。
解决方案
launch.json
通过转到打开调试配置
调试 -> 打开配置
在launch.json
中,改变
"console": "IntegratedTerminal"
至"console": "none"
我有同样的问题,上面的修复对我有用。您也可以尝试添加
"debugOptions": [
"RedirectOutput"
]
看看它是否适合你。
资源:
推荐阅读
- python - 代理向我们确定的目的地发送数据包
- c - 使用暗网检测物体时输出警告音
- javascript - React:如果孩子是道具的一部分,那么为什么不重新渲染父母
- c# - 通过 GraphAPI 的 O365 用户邮箱使用量大小
- sql - 将字符串转换为数字而不会丢失精度和比例
- nsis - 有没有办法在 NSIS 脚本中链接 DetailPrint 中的部分文本以指向文件?
- caching - 所有流量的缓存代理
- r - 使用 bslib 时覆盖 DT 默认选择颜色
- dynamic-programming - 基于累积延迟最小化的自适应交通信号控制动态规划
- react-native - 更新一个反应原生项目