Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code Debugger Immediately Exits

I use VS Code for a python project but recently whenever I launch the debugger it immediately exits. The debug UI will pop up for half a second then disappear. I can't hit a breakpoint no matter where it's placed in the current file. The project has the expected normal behavior when run in non-debug mode. I vaguely remember a command being inserted into the terminal window when I used to click debug but now I see nothing. I opened a totally different project but debugger still exits immediately.

Any advice? Anywhere I can find logs for the debugger run?

My launch.json file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

I have tried: running app as admin, reinstalling vs code, reinstalling python extension, restarting app, restarting computer, disabling all non-essential extensions, deleting launch.json, launching a file with only print statement.

like image 906
Cameron Blumenthal Avatar asked Apr 30 '26 14:04

Cameron Blumenthal


1 Answers

Please install Python 3.7 or later.

If you must use Python 3.6 or earlier, rollback the Python extension to version 2022.08.0.

Screenshot of extension in VS Code with "Install Another Version..." highlighted from the "Uninstall" alternate menu

Screenshot of extension version list with "2022.8.1" and "2022.8.0" highlighted

like image 196
JialeDu Avatar answered May 02 '26 02:05

JialeDu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!