Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configured debug type "python" is not supported for VS Code

I have issues debugging with VS code. I have installed python for vs code extension and reloaded it several time. But when I tried to run in the debug mode, I have the following error

The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled.

My launch.json has the following contain

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
    
    {
        "name": "Python : Fichier actuel",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal"
    }
]
}

What could be the issue?

like image 277
user3841581 Avatar asked Oct 04 '20 12:10

user3841581


People also ask

How do I run a Python script in debug mode in VS Code?

If you're only interested in debugging a Python script, the simplest way is to select the down-arrow next to the run button on the editor and select Debug Python File in Terminal.

How do I change debug configuration in VS Code?

Once you have your launch configuration set, start your debug session with F5. Alternatively, you can run your configuration through the Command Palette (Ctrl+Shift+P) by filtering on Debug: Select and Start Debugging or typing 'debug ' and selecting the configuration you want to debug.


2 Answers

I had the same problem and was able to solve it by uninstalling Python and Jupyter Notebook extensions in VS Code and then re-installing them. Note that Jupyter Notebook is now required to use the Python extension in VS Code.

like image 87
Hunter Avatar answered Oct 10 '22 18:10

Hunter


This issue is a VS Code bug, it is being solved in an early Dec-2021 release (v1.63). The warning has no effect whatsoever, there are no real issues running the code. So, don't pay attention to it, it will be fixed in a short time.

Edit note: Adding, removing, installing, or disabling/enabling the Jupyter Notebook and its related extensions seem to solve the problem but only until the next VS Code restart.

like image 9
Alejandro QA Avatar answered Oct 10 '22 18:10

Alejandro QA