Programmers often use an iterative process of hypothesis generation ("perhaps this function is called twice?") and hypothesis testing ("let's count how many times this breakpoint fires") to understand the behavior of unfamiliar or malfunctioning software. Existing debugging tools are much better suited to testing hypotheses than to generating them. Step debuggers, for example, present isolated snapshots of the program's state, leaving it to the programmer to mentally reconstruct the evolution of that state over time. We advocate for a different approach: building a debugging and program-exploration tool around a *trace*, or complete history, of the program's execution. Our key claim is that the user should see every line *as executed* (in time order) rather than *as written* (in syntax order). We discuss design choices, preliminary results, and interesting challenges.
翻译:程序员通常采用迭代过程——先提出假设(例如"这个函数是否被调用了两次?"),再验证假设(例如"统计这个断点触发了多少次")——来理解不熟悉或存在故障的软件行为。现有调试工具更适合验证假设而非生成假设。例如,步进调试器仅呈现程序状态的孤立快照,程序员需要自行在脑海中重建这些状态随时间演化的过程。我们主张采用不同方法:围绕程序执行的**轨迹**(完整执行历史记录)构建调试与程序探索工具。核心观点是用户应该看到每行代码**被执行的顺序**(按时间顺序),而非**被编写的顺序**(按语法顺序)。本文讨论设计选择、初步实验结果及值得关注的技术挑战。