一句话:通过问卷、IDE埋点与访谈揭示程序员调试行为分化:IDE调试器使用率低,printf调试仍普遍,高级功能知识不足。
软件开发中调试不可避免且常比预期更耗时,但人们对真实工程师如何调试、是否使用专用调试工具及自身调试知识知之甚少。本文采用混合方法:在线问卷收集176名开发者对调试的主观看法;通过为Eclipse和IntelliJ开发WatchDog 2.0插件,客观观测458名开发者的IDE调试器使用行为;再访谈调试专家与普通用户以解释差异。结果显示,IDE自带调试器并未如预期般频繁使用,printf调试仍是许多程序员的选择,高级调试功能的知识与使用率均偏低。研究据此呼吁加强计算机课程中的动手调试训练,并已改进现代IDE调试器的实现。
Debugging is an inevitable activity in most software projects, often difficult and more time-consuming than expected, giving it the nickname the "dirty little secret of computer science." Surprisingly, we have little knowledge on how software engineers debug software problems in the real world, whether they use dedicated debugging tools, and how knowledgeable they are about debugging. This study aims to shed light on these aspects by following a mixed-methods research approach. We conduct an online survey capturing how 176 developers reflect on debugging. We augment this subjective survey data with objective observations on how 458 developers use the debugger included in their integrated development environments (IDEs) by instrumenting the popular Eclipse and IntelliJ IDEs with the purpose-built plugin WatchDog 2.0. To clarify the insights and discrepancies observed in the previous steps, we followed up by conducting interviews with debugging experts and regular debugging users. Our results indicate that IDE-provided debuggers are not used as often as expected, as "printf debugging" remains a feasible choice for many programmers. Furthermore, both knowledge and use of advanced debugging features are low. These results call to strengthen hands-on debugging experience in computer science curricula and have already refined the implementation of modern IDE debuggers.