This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fabioz
Recipients Mark.Shannon, fabioz, ncoghlan, python-dev, vstinner
Date 2021-01-20.11:30:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611142222.81.0.981022755403.issue42197@roundup.psfhosted.org>
In-reply-to
Content
I agree that it can be made better, but I think most of the issues right now comes from CPython trying to automatically do something that's not bound to work (calling PyFrame_FastToLocals/PyFrame_LocalsToFast under the hood during the tracing call).

https://bugs.python.org/issue30744 is a great example of why that can never work properly (debuggers need to manage that much more carefully, just doing it on all calls is really bound to not work).

So, the current implementation besides being broken also makes things pretty slow.

I agree that PEP 558 may fix things here (but it's much more work).

As a disclaimer, pydevd actually uses a different tracer which doesn't do those calls and when possible uses the frame eval to modify the bytecode directly to minimize the overhead, so, in practice the current support given by CPython for debugger is pretty reasonable for doing a fast debugger (but there are a few caveats that it must work around -- such as the auto PyFrame_FastToLocals/PyFrame_LocalsToFast calls).
History
Date User Action Args
2021-01-20 11:30:22fabiozsetrecipients: + fabioz, ncoghlan, vstinner, Mark.Shannon, python-dev
2021-01-20 11:30:22fabiozsetmessageid: <1611142222.81.0.981022755403.issue42197@roundup.psfhosted.org>
2021-01-20 11:30:22fabiozlinkissue42197 messages
2021-01-20 11:30:22fabiozcreate