  In order to design and implement tracers, one must decide what exactly to
trace and how to produce this trace. On the one hand, trace designs are too
often guided by implementation concerns and are not as useful as they should
be. On the other hand, an interesting trace which cannot be produced
efficiently, is not very useful either. In this article we propose a
methodology which helps to efficiently produce accurate traces. Firstly, design
a formal specification of the trace model. Secondly, derive a prototype tracer
from this specification. Thirdly, analyze the produced traces. Fourthly,
implement an efficient tracer. Lastly, compare the traces of the two tracers.
At each step, problems can be found. In that case one has to iterate the
process. We have successfully applied the proposed methodology to the design
and implementation of a real tracer for constraint logic programming which is
able to efficiently generate information required to build interesting
graphical views of executions.
