Product Design, Manufacturing & Innovation Resources
Home » Online Tools » Python Tutor to Learn Programming Visually

Python Tutor to Learn Programming Visually

Python Tutor is a visual debugger that shows what a program does line by line. Code is pasted into the editor, and each step displays the current line, the call stack with local variables and the objects on the heap, with arrows for references between them.

Besides Python, it supports Java, C, C++, JavaScript and Ruby. Stepping forward and backward through the execution makes pointer behavior, mutable versus immutable objects, recursion and scoping rules visible, which are the usual sources of bugs for people who learn a language or move between languages.

Visualizations can be shared through a link, and the tool is widely embedded in programming courses. Programs run on the server with limits on length and execution time, so it is not a general development environment. It is best used for understanding short code fragments, explaining algorithms and finding logic errors.

Disciplines: Computer science education, Software engineering, Programming education.
Free alternative to Visual Studio Code debugger, PyCharm debugger.
Python Tutor compared with Visual Studio Code debugger and PyCharm debugger
Python TutorVisual Studio Code debuggerPyCharm debugger
Languages covered: It supports Python, Java, C, C++ and JavaScript, each with its own tool page. Python 3.11 is the listed Python version, and JavaScript covers synchronous code only.Languages covered: Debugging for JavaScript, TypeScript and Node.js is built in. Other languages and runtimes need a debugger extension from the Visual Studio Marketplace.
Way of showing execution: It draws the call stack, local variables, objects on the heap and pointers as a diagram, and lets you step forward and backward through the trace. This makes references and mutable objects visible without setting breakpoints.Way of showing execution: It shows values in Variables and Watch sections and lists active calls in a Call Stack section. Values can be changed during a session and expressions evaluated in the Debug Console.Way of showing execution: It lists the variables of the selected frame, supports watches evaluated at each step, inline values next to the code and an evaluate dialog for multiline expressions. Evaluation works only when the program is suspended at a breakpoint.
Breakpoints and control: Execution is stepped through the recorded trace, so there are no breakpoint types to configure. It is built for short programs rather than for locating faults in a large code base.Breakpoints and control: Breakpoints can be conditional, based on a hit count or on another breakpoint, and logpoints write messages without pausing. Function, data, inline and triggered breakpoints also exist.
Size limits and sandbox: Execution is capped at 1000 steps for Python, Java and JavaScript and about 300 steps for C and C++. Code size is limited to a few thousand characters, and programs run in a sandbox without file or network access.Size limits and sandbox: Remote debugging support depends on the debugger extension in use.
Installation, licence and cost: It runs in the browser on the vendor servers, needs no account and is free, with donations supporting the site. Your code is sent to the server to be executed.Installation, licence and cost: The source is MIT licensed as the Code - OSS repository, while the Visual Studio Code product is a Microsoft distribution under a product licence. Builds exist for Windows, macOS and Linux.Installation, licence and cost: PyCharm is installed locally. The unified edition keeps core features free and adds Pro features through a paid subscription, with a free Pro trial with each major release.

Privacy: we have no feedback of potential problem with this tool and author. But like many online services, you are here providing them with your own data. Depending of the criticity of your data, this is your responsibility to assess author's reputation and potential misusage, and to check and accept their terms and conditions, or not.

More Learning & Tutorials tools

Suggest your best online tool:

Do you know a better, a complementary or a replacement website to the one listed above ?

> Suggest it here <

10th year anniversary

Full size images and downloads are only available, 100% free, for registered members.

> Login <