Forum Archive

Visualizer?

DedicatedTiger

Just an idea about adding a feature to visualize execution of each line of a script from the app. :)

mikael

@DedicatedTiger, interesting idea. What would you imagine seeing on screen? One half executing something, the other showing lines as they are executed?

For most cases, this would probably be a useless blur, so would need to use debugging, manually or slowly stepping through code.

ccc

Maybe a slider (or buttons) to increase / decrease the inter-command delay so us humans could follow along.

DedicatedTiger

@ccc said:

Maybe a slider (or buttons) to increase / decrease the inter-command delay so us humans could follow along.

Yes very similar to Pythontutor website’s visualizer, but on the app :)

mikael

@DedicatedTiger, for ”print-based” apps, you can of course use the debugger, pdb.

For UI-driven apps this becomes a bit more challenging, especially on small phone screens.

I guess we can stdin/out from pdb, then use it to control the code execution in the background, but where to display it? @JonB’s work on overlays is an option, but would a semitransparent display of code be anything but confusing?

zihip

If we add more features in the previous feature than we have to visualize the execution of scripts line by line. In most cases, I recommend essayusa review to read the lines of script using an interpreter.