What extension do I need for Python debugging?
gdb - Python extension debugging - Stack Overflow
Install previous versions of the Python Debugger extension in VSCode.
VS Code Debugger not working for python
Videos
So I just sent up my first venv and got my libraries installed. I was going to run some good. But after hitting "run", it told me: "You don't have an extension for debugging Properties. Should we find a Properties extension in the Marketplace?" I agree to that, and the it leads me to three extensions in the marketplace: 1) CSS Custom Properties; 2) Logical Properties; 3) Java.
Not being able to really discriminate here, I installed all of them. And yet, none appear to work. I get that same error message when I try to run the code. I can't seem to get past this point. Any suggestions or idea about the "extension for debugging?"
Thanks!
For source debugging to work, your C extensions must be built with debug info (gcc -g). Since you're driving the compilation process with distutils, you can specify the compiler flags used through the CFLAGS environment variable (Installing Python Modules: Tweaking compiler/linker flags):
CFLAGS='-Wall -O0 -g' python setup.py build
Note that even if distutils defaults to a higher optimization level than -O0, you really shouldn't get that No symbol "node" in current context error as long as -g is passed and most Python builds do pass -g by default.
The problem is the optimization. I'm not sure how to do it from the command line, but in the setup.py script I just added extra_compile_args=['-O0'], to the Extension constructor and everything worked.
Would still like (and would accept) an answer that involved a command line arg (something after python setup.py build) that would accomplish the same thing so I don't have to have a compiler specific line in my setup.py file.
The Python extension is broken - just seems to have updated at the same time as VS Code.
Go back to extension version v2021.12.1559732655 by clicking on the extensions control and selecting "Install another version...". Note that you will have to disable "Extensions: Auto Update", which might be a good thing. I also set "Update: Mode" to "none" for good measure.
So this bug is back with Python Extension version v2022.10.1 running on Ubuntu 18.04 with python 3.6.9.
This is a serious bug that keeps happening.
I had to roll back to extension version v2021.12.1559732655 to debug.
Seems that I got my answer on ghithub. The debugger will not work with versions lower than Python 3.7.
For anything other than Python 3.7+ (like Python 2.6 ) use the 2021.12 version of the vs code python extension.
https://github.com/microsoft/vscode-python/issues/19559#issuecomment-1358494296
Using Visual Studio Code:
Version: 1.86.2 (user setup)
Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:40:56.878Z
Electron: 27.2.3
ElectronBuildId: 26908389
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.22621
I solved this issue by creating a "launch.json" file in a ".vscode" folder, in the project folder (https://code.visualstudio.com/docs/python/debugging). Without this file, the debugger didn't start. Using previous versions of VS Code, I was able to start a debugger without "launch.json" file, but not now. After creating the file, the python debugger started ok.