Flash tip: Advanced trace output in Flash ActionScript 3.0, Class name, function name and line number

Hello,

Today a tip for ActionScript developers.

It’s been a while I looking for an advanced trace output with more details in few line of code.

Just add this line of code instead the trace() function to get a trace message in your ouput with all details.

The output will show this :

Installation

  1. Download the Debug.as file
  2. Copy and paste de Debug.as at the root project, in the same folder of the .fla file
  3. Enable Debugging in Flash. Publish parameters > swf  > Advanced > Allow debugging
  4. Use the following code to display the advanced debugging message

Usage

Source code

Debug.as code:

Good programming :).

Leave a Comment