Specifications

245
Chapter 12: Using the Command-Line
Debugger
If you encounter errors in your applications, you can use the debugging tools to set and manage breakpoints in
your code; control application execution by suspending, resuming, and terminating the application; step into and
over the code statements; select critical variables to watch; evaluate watch expressions while the application is
running, and so on.
Topics
About debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Starting a debugging session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
Configuring the command-line debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250
Using the command-line debugger commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
About debugging
Debugging Adobe® Flex® applications can be as simple as enabling trace() statements or as complex as stepping
into an applications source files and running the code, one line at a time. The Adobe® Flex® Builder™ debugger and
the command-line debugger, fdb, let you step through and debug the files used by your Flex applications.
Note: For information on debugging Adobe® AIR™ applications, see "Using the AIR development tools" in Developing
AIR Applications with Adobe Flex 3.
To debug a Flex application, you must generate a debug SWF file. This is a SWF file with debug information in it.
You then connect fdb to the debugger version of Adobe® Flash® Player that is running the debug SWF file.
The debugger is an agent that communicates with the application that is running in Flash Player. It connects to
your application with a local socket connection. As a result, you might have to disable anti-virus software to use
it if your anti-virus software prevents socket communication. The debugger uses this connection to transfer infor-
mation from the SWF file to the command line so that you can add breakpoints, inspect variables, and do other
common debugging tasks. The port through which the debugger connects to your application is 7935. You cannot
change this port.