【发布时间】:2021-01-29 19:17:07
【问题描述】:
我正在尝试更改 VS Code 中内置 Python 终端的启动参数,因为它继续运行代码(当我按下右上角的播放按钮时)使用错误的参数。
基本上我想要它,以便内置终端以不同的方式运行我的 Python 代码(python3 -u... 而不是 python -u)
【问题讨论】:
标签: python visual-studio-code terminal
我正在尝试更改 VS Code 中内置 Python 终端的启动参数,因为它继续运行代码(当我按下右上角的播放按钮时)使用错误的参数。
基本上我想要它,以便内置终端以不同的方式运行我的 Python 代码(python3 -u... 而不是 python -u)
【问题讨论】:
标签: python visual-studio-code terminal
假设您使用的是 Python 扩展:
打开设置,搜索Python › Terminal: Launch Args。
在命令面板中尝试Python: select interpreter。
打开设置,搜索Python: Default Interpreter Path。
您可能希望在.vscode/launch.json 文件中添加一些参数。 More info about that in the docs.
【讨论】: