Reputation: 2747
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?
Upvotes: 18
Views: 24099
Reputation: 41
I had this same problem. The easiest way for me to fix it, was to:
After that selection, VSCode prompted me that
X,Y,Z, will need to be installed and configured".
I did that, and then everything worked just fine!
Upvotes: 1
Reputation: 156
I had the same problem, but I think it came from using virtualenvwrapper
:
when creating virtual environments using mkvirtualenv
the virtual environment is not placed inside the project folder (e.g. in a folder .venv), but gathered in a central place defined by the $WORKON_HOME
user environment, which has to be defined during installation of virtualenvwrapper
.
So far, so good - but VSCode has to be told, where this central folder lies. At least this was what solved the problem for me. So:
Python
(by Microsoft) and click on the gearwheel next to the Python icon -> Extension settings)@ext:ms-python.python venv
$WORKON_HOME
)After that I restarted VSCode and it didn't complain anymore in the launch.json
file (or in my case, the .code-workspace
file), VSCode immediately found the python interpreter in the virtual environment and everything worked fine again.
Upvotes: 0
Reputation: 384
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.
Upvotes: 8
Reputation: 211
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.
Upvotes: 21