在 vscode 中运行没有任何反应

问题描述 投票:0回答:1

当我尝试在 vscode 中的 venv 中运行任何 python 脚本时,除了调试工具栏短暂弹出并消失之外,没有任何反应。现在没有任何问题,如果我没有故意改变任何东西,它就无法工作。如果我手动将程序输入到python终端中,我可以正常运行。有没有办法知道 vscode 正在尝试运行什么?

尝试重启 关闭所有文件夹 Ctrl+Shift+n 解释器路径在 venv 中设置为 python

这是我的launch.json

{
    "configurations": [
        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            
        },
          
    ]
}
python visual-studio-code vscode-debugger
1个回答
0
投票

这是 VSCode 中的一个错误。
https://github.com/microsoft/vscode/issues/228191

昨天(2024-09-24)已修复,但可能尚未滚动到您正在使用的版本。

您可以切换到 VSCode Insiders 版本,该版本已修复。
或者您可以尝试删除

"console": "integratedTerminal"

选项,我认为与该问题相关。

© www.soinside.com 2019 - 2024. All rights reserved.