-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'debugpy' #1148
Comments
Downgrading the Python extension to v2022.18.2 fixes the problem |
I'm seeing this on my projects since the latest VS Code updates. Python 3.10.6, Python ext v2022.20.0. Installing debugpy into the venv gives the following error:
|
The spurious "incompatible copy" warning is a separate issue that shows up outside of Docker scenarios; I've created #1149 to track that. |
This is due to a mismatch between: debugpy/src/debugpy/_vendored/force_pydevd.py Lines 70 to 73 in 1c79248
and:
Note that one side uses %r , so the path will be quoted, but then the other side simply takes everything up to ; and appends it to sys.path , quotes and all.
|
Fix microsoft#1149: UserWarning: incompatible copy of pydevd already imported Fix formatting for sys.path entry passed to subprocesses.
I'm experiencing this with Visual Studio 2022 (not vs code), specifically when I attach my debugger to a running python process which contains a |
Can you please file a separate issue? VS doesn't have multiprocess debugging integrated yet unlike VSCode, and that may be part of the problem in your case. It would also help greatly if you can collect and provide debugpy/pydevd logs - since this is an attach scenario, you should be able to enable them via |
Environment data
Actual behavior
Debugging Flask apps throws a ModuleNotFoundError, even with a minimal application. This happens both when I use the built-in debugger config, or create my own via launch.json. The terminal output is:
This a new phenomenon that I'm only getting with this latest VSCode release.
Expected behavior
Debugging a flask app should not throw an error. While in this minimal case, the debugger and server keep running despite the error, some higher level apps that use Flask under the hood (e.g. Dash) catch this error and stop themselves.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: