This directory contains TraceVis scripts.


To use TraceVis:

- Currently it can only be used with the JavaScript shell 'js', not within
  Firefox.

- Configure using --enable-tracevis.

- If running your program from the command line, use the -T option, i.e.:

    js -j -T <tracevis-file> foo.js
  
- If running your programs within the interactive shell, use the
  startTraceVis() and stopTraceVis() functions to turn TraceVis recording on
  and off.  startTraceVis() takes an optional parameter which is the name of
  the file to write the TraceVis output to;  if unspecified, the name
  defaults to 'tracevis.dat' in the current directory.

- To view the recorded data in graphical form, run:

    python vis.py <tracevis-file> <png-file>

  The graph will be written to the file <png-file> in PNG format.

- To view some basic data about the recorded data, run:

    python binlog.py <tracevis-file>


Troubleshooting:

- If you get this message when running the python scripts:

    Traceback (most recent call last):
      File "vis.py", line 2, in <module>
        import Image, ImageDraw, ImageFont
        ImportError: No module named Image

  then you need to install libraries from
  http://www.pythonware.com/products/pil/.


TODO list:

- Make the Python scripts more robust, e.g. handle file opening failures
  gracefully.

- Make it usable within Firefox.
