Search code examples
pythonvisual-studio-codevscode-debugger

Run in vscode does nothing


When I try to run any python script in my venv in vscode nothing happens except the debug tool bar pops up briefly and goes away. Didnt have any issues now its not working without me knowingly changing anything. I can run properly if I manually type the program into the python terminal. Is there a way to tell what vscode is trying to run?

Tried restarting closing all the folders ctrl+shift+n interpreter path is set to python in the venv

this is my launch.json

{
    "configurations": [
        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            
        },
          
    ]
}

Solution

  • This is a bug in VSCode.
    https://github.com/microsoft/vscode/issues/228191

    It has been fixed yesterday (2024-09-24), but probably not rolled to the release you are using yet.

    You can switch to VSCode Insiders release, which has the fix.
    Or you can try removing the

    "console": "integratedTerminal"
    

    option, which I think is related to the issue.