Programmer's Wiki

trace(); is a command used in AS2.0 to type text to the debug console. Each trace command used writes a new line in the debugger console.

trace(); is regularly used to test flash based applications. trace(); lines are only shown when testing flash applications in Flash, and not when run in a web browser.

Standard Syntax[]

Standard syntax is:

trace("Hello, world");

Example above prints "Hello, world" into the debugger console.

Usage of variables can be:


which would print out the variable "aVariable".

Combining normal text and variables is done like the following:

trace("A variable is: "+aVariable");

See Also[]