The Tracer Suite for Frontier and Radio

Trace UserTalk code as it executes.
Created by John VanDyk
Version 0.9 released May 21, 2002.

Why I Wrote It

I wanted to find out which scripts were being called in which order when Frontier did something without having to step through the code myself. This is useful for quickly finding out how a plugin works, for example. This is a tool intended for seasoned developers who know what they're doing.

What It Does

Most scripts start with the on statement. For example, on showMsg(s) msg(s) The tracer suite simply adds a line of code to each script in the target table. The line of code is a call to the tracer suite's logging script. So after running the tracer suite, the script above becomes: on showMsg(s) suites.tracer.log(this) msg(s) When the script runs, it calls suites.tracer.log. Thus, as various scripts run, you can see the path of execution by watching the outline that the tracer suite generates at user.tracer.tracerLog. Tracer will only detect the first "on" statement. This is so you don't get an outline full of meaningless calls to add(s). To try it out, choose Suites --> Tracer from the Frontier's Main menu. Select the exampleScript script in the suites.tracer table. Now choose "Install Trace Code" from the Tracer menu. See what happens to exampleScript? Run exampleScript. Then view user.tracer.tracerLog. To try it on a table of scripts, select the exampleTable.

Things To Watch Out For

Warning: this suite modifies code! ALWAYS KEEP A BACKUP of the code you are tracing. When removing trace code from very large tables tracer will sometimes quit with a "not an outline" message. If anyone has time to debug this, please send me a fix. The default size of the log outline is 150 lines. Setting it (user.tracer.linesOfRollingLog) to a very large value will slow down execution. Download suites.tracer as a .sit, .hqx or .zip file.