Visualize Python code execution line-by-line within Jupyter Notebook cells for debugging and educational purposes.
Nbtutor is a Jupyter Notebook extension that visualizes Python code execution line-by-line within notebook cells. It animates the step-by-step execution process, showing variable states and memory behavior to help understand program flow. The tool is particularly useful for debugging and educational purposes in interactive computing environments.
Python developers, educators, and students using Jupyter Notebooks who want to visualize and understand code execution for debugging or learning purposes.
Developers choose Nbtutor because it provides integrated, interactive code visualization directly within Jupyter Notebooks without needing external tools, making it convenient for both debugging complex code and teaching programming concepts.
Visualize Python code execution (line-by-line) in Jupyter Notebook cells.
Uses IPython magic commands like %load_ext and %%nbtutor to embed visualization directly in Jupyter cells, eliminating the need for external tools as demonstrated in the README installation steps.
Animates line-by-line execution and displays variable states in a visual stack and heap, making it ideal for teaching programming concepts and debugging, inspired by tools like Online Python Tutor.
Offers options to set frame depth and sequence element limits (e.g., --depth and --max_size) to manage display complexity and avoid clutter, as detailed in the optional arguments section.
Supports stepping through frames from other cells and global scopes with the --step_all option, enabling comprehensive analysis across the entire notebook workflow.
Installing from source requires building JavaScript and CSS assets, as the README notes that direct repo installation won't work, making contributions or custom builds non-trivial.
Primarily designed for Jupyter Notebook classic; compatibility with JupyterLab or other modern notebook interfaces is not mentioned, potentially restricting its use in updated workflows.
Visualizing every execution step adds computational overhead, which could slow down code runtimes, especially for large or long-running tasks, though this trade-off isn't addressed in the README.
nbtutor is an open-source alternative to the following products:
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.