【问题标题】:Issue while using Python in Visual Studio Code在 Visual Studio Code 中使用 Python 时出现问题
【发布时间】:2019-01-19 18:21:57
【问题描述】:

我在使用带有 Visual Studio Code 的 Python 时收到以下错误消息:

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,但没有成功。

【问题讨论】:

    标签: python


    【解决方案1】:

    通过转到

    打开调试配置launch.json

    调试 -> 打开配置

    launch.json,更改

    "console": "IntegratedTerminal""console": "none"

    我遇到了同样的问题,上面的修复对我有用。您也可以尝试添加

    "debugOptions": [
        "RedirectOutput"
    ]
    

    看看它是否适合你。

    来源:

    Having problems with debugging in .vscode

    VScode starts debugging in integrated terminal instead of debug console

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-29
      • 2020-08-02
      • 2022-01-07
      • 1970-01-01
      • 2021-09-23
      • 1970-01-01
      • 2021-12-17
      相关资源
      最近更新 更多