[issue25146] IDLE debugger could better visualize program execution

Mark Roseman report at bugs.python.org
Sat Sep 19 23:14:44 CEST 2015


Mark Roseman added the comment:

Regarding the nested loops, what's happening is:
- IDLE tells interpreter to run program
- Interpreter now has control and is running program, start to end
- Because execution is being traced, before every statement we get a callback

If we didn't use the nested loop and just returned back immediately after we're called, the program would go onto the next statement, and the next one, etc. (it's in control).

Instead, we block to force the program to wait until we do something, at which point it continues to the next statement, after possibly modifying the conditions under which the execution traces fire.

If instead, we tell the execution tracing to actually stop on every statement (rather than running through start to end), we'll get a callback for each statement (to update our display), but can decide to stay stopped, or immediately continue on, based on whether we last did single-step, in/out, go, etc. That way it is more event-based: we don't need the nested event loop to 'block' the program from running.

Totally agree on your suggestions (speed setting, and whether or not to show where we are outside our own code).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25146>
_______________________________________


More information about the Python-bugs-list mailing list