Understanding how developers interact with code generation tools (CGTs) requires detailed, real-time data on programming behavior which is often difficult to collect without disrupting workflow. We present \textit{CodeWatcher}, a lightweight, unobtrusive client-server system designed to capture fine-grained interaction events from within the Visual Studio Code (VS Code) editor. \textit{CodeWatcher} logs semantically meaningful events such as insertions made by CGTs, deletions, copy-paste actions, and focus shifts, enabling continuous monitoring of developer activity without modifying user workflows. The system comprises a VS Code plugin, a Python-based RESTful API, and a MongoDB backend, all containerized for scalability and ease of deployment. By structuring and timestamping each event, \textit{CodeWatcher} enables post-hoc reconstruction of coding sessions and facilitates rich behavioral analyses, including how and when CGTs are used during development. This infrastructure is crucial for supporting research on responsible AI, developer productivity, and the human-centered evaluation of CGTs. Please find the demo, diagrams, and tool here: https://osf.io/j2kru/overview.
翻译:理解开发者如何与代码生成工具交互,需要获取详细、实时的编程行为数据,而这些数据往往难以在不干扰工作流的情况下收集。本文提出\textit{CodeWatcher},一个轻量级、非侵入式的客户端-服务器系统,旨在从Visual Studio Code编辑器内部捕获细粒度的交互事件。\textit{CodeWatcher}记录具有语义意义的事件,例如由代码生成工具执行的插入、删除、复制粘贴操作以及焦点切换,从而能够在无需修改用户工作流的情况下持续监控开发者活动。该系统包含一个VS Code插件、一个基于Python的RESTful API和一个MongoDB后端,所有组件均已容器化,以实现可扩展性和易于部署。通过对每个事件进行结构化处理和时间戳标记,\textit{CodeWatcher}支持对编码会话进行事后重建,并促进丰富的行为分析,包括在开发过程中代码生成工具的使用方式和时机。此基础设施对于支持负责任的人工智能研究、开发者生产力以及代码生成工具的人本评估至关重要。演示、图表及工具请访问:https://osf.io/j2kru/overview。