Understanding programming behavior in modern software development is increasingly important with the rise of artificial intelligence (AI). Despite this increased importance, researchers lack tools to capture the complex, often invisible cognitive shifts in developer programming behavior. To address this gap, we present DevSelfTrace, a general-purpose annotation tool that enables developers to retrospectively annotate their programming behavior across four key dimensions: intention, action, supporting tool, and emotion. DevSelfTrace supports flexible time segmentation, customizable labels, and exports structured logs in JSON format.
DevSelfTrace has been used by 84 developers across multiple rounds of a mixed-methods user study investigating developer-AI interaction, where the collected annotation data directly supported the behavioral analysis reported in that study. A dedicated tool evaluation survey (N=33) indicates that 66.7% of developers found DevSelfTrace easy to use, and 87.9% agreed that it could support research or education on programming behavior.