• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

13. Testing and Debugging > 13.6. Trace Debugging

Trace Debugging

Trace debugging is sometimes the most useful way of debugging your applications, because it is quick to implement and offers immediate feedback. The Output window (a.k.a. trace window) in Flash’s authoring environment provides instant feedback when you test a movie. By simply adding a trace( ) statement to your movie, you are effectively adding debugging code.

In its simplest form, trace debugging involves tracing a value to the Output window:

trace(myVariable);

As you become more organized in your debugging and testing procedures, you will add more information so that the output is more readable and useful:

trace("myVariable: " + myVariable + " in function myFunction( )");

If your movie is complex and there are areas that demand constant debugging, you can put a debug flag in your script as a local variable and uncomment it when you want to debug:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint