VS Code Debugger Immediately Exits

2024/10/5 13:29:51

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.

Answer

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

https://en.xdnf.cn/q/70481.html

Related Q&A

Sudoku Checker in Python

I am trying to create a sudoku checker in python:ill_formed = [[5,3,4,6,7,8,9,1,2],[6,7,2,1,9,5,3,4,8],[1,9,8,3,4,2,5,6,7],[8,5,9,7,6,1,4,2,3],[4,2,6,8,5,3,7,9], # <---[7,1,3,9,2,4,8,5,6],[9,6,1,5,…

Subclassing numpy scalar types

Im trying to subclass numpy.complex64 in order to make use of the way numpy stores the data, (contiguous, alternating real and imaginary part) but use my own __add__, __sub__, ... routines.My problem i…

Python file IO w vs wb [duplicate]

This question already has answers here:What does wb mean in this code, using Python?(5 answers)Closed 10 years ago.Wondering what the real difference is when writing files from Python. From what I can…

How to extract hour, minute and second from Series filled with datetime.time values

Data:0 09:30:38 1 13:40:27 2 18:05:24 3 04:58:08 4 09:00:09Essentially what Id like to do is split this into three columns [hour, minute, second]Ive tried the following code but none see…

Getting an error attachment_filename does not exist in my docker environment

Due to some reasons this particular code is not working in docker but it works fine in development environment. I am getting error "TypeError: send_file() got an unexpected keyword argument attach…

How to check if a process with Command line argument is running using python

I would like to check if a script is running with a specific command line argument within a python script.For example I would like to check if:main.py testargIs running. Is there any way I can achieve …

cx_oracle and python 2.7 [duplicate]

This question already has answers here:Python module "cx_Oracle" module could not be found(4 answers)Closed 5 years ago.Im using python 2.7 and cx_oracle ( Windows x86 Installer (Oracle 10g, …

Inheritance in Python C++ extension

I have c++ library that need communicate with Python plugged in modules. Communication supposes implementing by Python some callback c++ interface. I have read already about writing extensions, but no …

exposing C++ class in Python ( only ET_DYN and ET_EXEC can be loaded)

I was looking at here to see how to expose c++ to Python. I have built Python deep learning code which uses boost-python to connect c++ and python and it is running ok, so my system has things for boos…

Migrations in mongoengine: InvalidId

I am working with mongoengine and trying to do a simple migration. I have a field which I would like to migrate from being a StringField to a ReferenceField to another Object. I planned on doing the …