Skip to content
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

Support Python 3.11 frozen modules #861

Closed
fabioz opened this issue Mar 3, 2022 · 10 comments
Closed

Support Python 3.11 frozen modules #861

fabioz opened this issue Mar 3, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@fabioz
Copy link
Collaborator

fabioz commented Mar 3, 2022

See: fabioz/PyDev.Debugger#213

@YvesDup
Copy link
Contributor

YvesDup commented Mar 5, 2022

May be this issue can be reopen ?
microsoft/vscode-python#941

@int19h
Copy link
Contributor

int19h commented Mar 8, 2022

@YvesDup You should create an issue in the corresponding repository - this one is specifically for debugpy, but the issue you've linked to is about the way vscode-python uses debugpy.

@gvanrossum
Copy link

A workaround is to add this to the configuation in launch.json:

"pythonArgs": ["-Xfrozen_modules=off"],

@YvesDup
Copy link
Contributor

YvesDup commented Mar 15, 2022

@int19h Sorry :( for the misunderstood. I just proposed to add a new entry to pass args to Python like proposed in that issue. But it already exists as the "pythonArgs" of lauch.json.

I am wondering what are the differences debugpy and pydev.debugger ? Are they both a debugger for Python or not or something more ? Thank

@int19h
Copy link
Contributor

int19h commented Mar 15, 2022

PyDev.Debugger aka pydevd is one of the oldest Python debuggers around - it's the one originally made for Eclipse/PyDev, hence the name. It implements core functionality such as stepping and breakpoints. It runs inside the process being debugged, and thus, in general, it does things that are best done from within that process.

debugpy is basically a wrapper around pydevd that adds process lifetime management. It runs as a separate process from the debuggee, and thus, in general, it does things that are best done from outside of the process that is being debugged. So it can handle requests to launch processes for debugging or attach to running processes (and sets up pydevd as needed to handle those scenarios), and it keeps track of and coordinates processes in a multiprocess debug session. But it also does stuff such as stdout/stderr output capture.

To allow for easy deployment, debugpy vendors (i.e. embeds) all of its dependencies outside of the Python stdlib, including pydevd. So you don't have to worry about any of this while using it, but when we track work to be done, it can end up in either repo depending on where it was originally reported, and what the issue is.

@YvesDup
Copy link
Contributor

YvesDup commented Mar 16, 2022

@int19h Thank for your explanation

@fabioz fabioz added the enhancement New feature or request label Apr 1, 2022
@int19h
Copy link
Contributor

int19h commented May 23, 2022

Fixed by #937

@int19h int19h closed this as completed May 23, 2022
@dc-avasilev
Copy link

not fixed https://github.com/microsoft/debugpy/pull/937/files#r1145404312

@ergoithz
Copy link

ergoithz commented Jul 13, 2023

Not working with non-fork subprocesses due upstream bug python/cpython#106723

@majikes
Copy link

majikes commented Aug 14, 2023

For what it's worth, I just converted from Python 3.9.12 to Python 3.11.4 and had to add export PYDEVD_DISABLE_FILE_VALIDATION=1 && into makefile commands to get rid of the error message. But even with the messages suppressed, it would appear that the compiles are taking a lot longer to complete

jbootsma added a commit to jbootsma/eie_sam3u2_vsc that referenced this issue Sep 21, 2024
Updates to use the new debugger for python, as the previous one used
is deprecated by microsoft. Also adds a workaround for the issue noted
here: microsoft/debugpy#861
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants