Towards the Automation of Information Gathering and Hypothesis in Debugging
All developers inevitably encounter bugs in their code. While experience can affect where a developer may begin to look or how they would go about the problem, all developers approach debugging as a process of information gathering and formulating hypotheses about the cause of the bugs. But manually collecting information consumes time and developers often fall upon incorrect hypotheses that further prolong the debugging process. We argue that information gathering and formulating hypotheses do not have to be entirely manual. Debugging tools may help collect information from different sources and presents multiple hypotheses as to what could possibly be causing the bug. To demonstrate the plausibility of such tools, we developed an early prototype of a debugger named Hypothesizer. We built Hypothesizer as a Chrome devtools extension that can work with a modern web application built using React. The debugger currently collects chronological information about the bug and presents it in a timeline format. We ran Hypothesizer across bugs reported by professional developers on the internet. After manually examining four bugs in detail, Hypothesizer was able to collect information from source code coverage, user interaction, and network events. Initial results suggest that Hypothesizer can collect enough information to offer hypotheses to developers about what might cause the bug. The next research step is to improve Hypothesizer to analyze the collected information and offer hypotheses.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.