Fabio Zadrozny <fabi...@gmail.com> added the comment:

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).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42197>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to