[Erlang Systems]

7 Debugging

7.1 Tracing

We have instrumented our code in order to enable tracing. Running the application with tracing deactivated, causes a neglectible performance overhead (an external call to a function which returns an atom). Activation of tracing does not require any recompilation of the code, since we rely on Erlang/OTP's built in support for dynamic trace activation. In our case tracing of calls to a given external function.

Event traces can be viewed in a generic message sequence chart tool, that we have written. It can either be used in batch by loading event traces from file or interactively, as we are doing at demos and when we debug our own code. The event trace stuff can for the moment be found under megaco/utils but, will later be documented and released as an own application.

We have a framework for automated testing which is rather useful. It is a subset of Mnesia's test server. The test server may be used in conjunction with the event tracing, e.g. by:

   cd megaco/test
   gmake test

or

   cd megaco/test
   gmake utest

or

   cd megaco/test
   gmake ftest

or
   cd megaco/test
   gmake gnuplot_gif
    

Copyright © 1991-2001 Ericsson Utvecklings AB