On Sun, Oct 1, 2017 at 11:15 PM, Terry Reedy <tjreedy@udel.edu> wrote:
On 10/2/2017 12:44 AM, Guido van Rossum wrote:
- There's no rationale for the *args, **kwds part of the breakpoint()
signature. (I vaguely recall someone on the mailing list asking for it but it seemed far-fetched at best.)
If IDLE's event-driven GUI debugger were rewritten to run in the user process, people wanting to debug a tkinter program should be able to pass in their root, with its mainloop, rather than having the debugger create its own, as it normally would. Something else could come up.
But if they care so much, they could also use a small wrapper as the sys.breakpointhook that retrieves the root and calls the IDLE debugger with that. Why is adding the root to the breakpoint() call better than that? To me, the main attraction for breakpoint is that there's something I can type quickly and insert at any point in the code. During a debugging session I may try setting it in many different places. If I have to also pass the root each time I type "breakpoint()" that's just an unnecessary detail compared to having it done automatically by the hook. -- --Guido van Rossum (python.org/~guido)