I use the VSCode debugger for all of my Python projects extensively. But for one of my projects, the debugger just doesn't work.
Whenever I try to debug something, it seemingly tries to activate the virtual environment. Then, the debugger just hangs until failure.
For any other project of mine, using debug with files, or modules, or whatever other options there are for Python, works fine. For this specific project, it has this awkward behavior.
I've tried:
launch.json
.~/.zshrc
.start.py
, and running that. The error persists.python
on the CLI.Nothing has worked.
Every other project I have tested works fine. It seems the only delimiting factor of the issue is, absurdly, the name of the folder from which I run the code in. (This paragraph is wrong; I was being obtuse. I've edited below to line out what the real delimiting factor was).
Edit: I have finally gotten the project to work by not using a virtual environment. Upon further testing, other projects have the same issue when using a virtual environment.
I've never had this issue before with virtual environments, so I don't know why it's acting up now. While the issue has been narrowed down, my problems persist as I need a virtual environment for my project.
Turns out the fix was manually copying the command VSCode runs to debug, and running it in the integrated terminal manually.
This worked for debugging it once, and the entire system fixed itself somehow after.
I have no idea why, or what was happening originally. This seems like a bug still, however it is "resolved."