The Tracer class is plugged and included with the DebugConsole class but you can use it on its own. It is a 'super' trace class. Now why would I need another type of trace class? For two main reason:

  1. The trace class provide only one functionality but I would like to have more.
  2. When working with multiple developer on the same project you could end up with so many traces in the output window that you'll need to spend time finding yours.

For complex developement and/or team developement it is recommended to use and create a Logger type of class as in the Flex framework for example. I have done that in the past too but I always wanted something more universal and simple. That is why I created this class and I use it now in all my projects. Main features are:

  1. Output all trace to output window or not.
  2. Keeps all traces in memory for later retreival. (all traces can be sent to a log.txt for example at any time)
  3. Can trace an object like trace does.
  4. Can trace all property of any object (even dynamic properties)
  5. Can trace by category. (you could set it to trace only your traces and not your colleague traces)
  6. Trace by object (you can set a trace scope)

Use the DebugConsole in this example and type "dump" to show all the traces:

Tracer.useOutput = false;, "speed", this);

Note how using Tracer.reveal() shows all property of the object including dynamic ones. You could of course use this on an array, object, dictionary and all contained object will be revealed.

I use this on all my projects including projects involving many developers. All traces are kept organized and I can isolate mine easily from the other developers. I can easily set a log system and output everything to my log at anytime. The reveal() method is truly the nice additional feature that allows me to look globally at an object state instead of just tracing one value. This is also very useful when working with JSON and other object based data which is often the case when your application interacts with Javascript APIs.