【问题标题】:How to change the Python launch args on the built in VS Code terminal如何在内置的 VS Code 终端上更改 Python 启动参数
【发布时间】:2021-01-29 19:17:07
【问题描述】:

我正在尝试更改 VS Code 中内置 Python 终端的启动参数,因为它继续运行代码(当我按下右上角的播放按钮时)使用错误的参数。 基本上我想要它,以便内置终端以不同的方式运行我的 Python 代码(python3 -u... 而不是 python -u

【问题讨论】:

    标签: python visual-studio-code terminal


    【解决方案1】:

    假设您使用的是 Python 扩展:

    向 python 解释器添加参数

    打开设置,搜索Python › Terminal: Launch Args

    更改当前的 Python 解释器

    在命令面板中尝试Python: select interpreter

    更改默认值

    打开设置,搜索Python: Default Interpreter Path

    使用调试器时

    您可能希望在.vscode/launch.json 文件中添加一些参数。 More info about that in the docs.

    【讨论】:

      猜你喜欢
      • 2022-01-06
      • 2021-11-01
      • 2022-07-26
      • 2020-06-25
      • 2019-06-09
      • 2023-03-10
      • 1970-01-01
      • 1970-01-01
      • 2019-05-06
      相关资源
      最近更新 更多