Python Tutor 是一款可视化调试器,它逐行显示程序的运行过程。代码粘贴到编辑器后,每一步都会显示当前行、包含局部变量的调用栈以及堆上的对象,并用箭头表示它们之间的引用关系。
除了 Python,它还支持 Java、C、C++、JavaScript 和 Ruby。通过逐步执行代码,可以清晰地看到指针行为、可变对象与不可变对象、递归以及作用域规则,这些都是学习编程语言或在不同语言之间转换时容易出错的地方。
Visualizations can be shared through a link, and the tool is widely embedded in programming 课程. 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 算法 and finding logic errors.

























