Debugging Flash Remoting Applications

Flash is a complex environment, and adding Flash Remoting to the equation only increases the complexity. You must contend not only with the visual aspects of your Flash movie and the underlying ActionScript, but also the server-side code, the database code, and the HTTP connections. There are quite a few pieces that make up the client/server environment of a Flash Remoting application, and quite a few places where your application can go wrong. Debugging a Flash Remoting application involves complex interaction between all of these environments, as well as the ability to separate the parts of the application so that they can be examined without the added burden of the sum of all the parts. Refer to the best practices offered in Chapter 12 for ways to isolate the various portions of your program to ease development and testing.

Types of Errors

Errors in any programming environment can be divided into several logical categories (although see “Error Types” in Chapter 3 for additional discussion of potential sources of errors):

Syntax errors

Errors caused by incorrect use of code. This could be a simple use of a programming construct in the wrong way, or using some programming construct that doesn’t exist in ActionScript. These are usually caught at compile time. Previewing in Flash is considered compile time.

Typographical errors

Errors caused by simply mistyping a piece of code. Color coding is a big help in finding these types of errors; many times ...

Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.