Objective. We review how handheld computer diaries may be used to measure attention to pain in daily life, and how this method helps in clarifying the relationship between attentional focusing and chronic pain. Results. Signal-contingent sampling of attention to pain and pain intensity with computer diaries has demonstrated that at times when patients report increased attention to pain, they also report higher pain intensity. Time-lagged analyses assessing the temporal precedence of changes in pain and attention using computer diaries demonstrated that this association is bidirectional. One diary study manipulated attention toward or away from pain, but this manipulation proved not successful in changing pain intensity. Conclusion. Signal-contingent sampling of pain and attention within patients has furthered our understanding of how these two constructs are related. Handheld computer diaries offer a flexible tool and have several advantages over traditional self-report questionnaires and paper diaries. Complex sampling schemes, in which the timing of signals, or the content of the questions may depend on previous events or responses, are possible. Future research may focus upon the application of handheld computers to measure pain and attention in therapy outcome studies, and upon the combination of event contingent sampling with time contingent sampling.