The fdb command-line debugger includes commands that you use to debug and navigate your Flex application.
The fdb debugger provides several commands for stepping through the debugged application's files. The following table summarizes those commands:
|
Command |
Description |
|---|---|
| continue |
Continues running the application. |
| file [file] |
Specifies an application to be debugged, without starting it. This command does not cause the application to start; use the run command without an argument to start debugging the application. |
| finish |
Continues until the function exits. |
| next [N] |
Continues to the next source line in the application. The optional argument N means do this N times or until the program stops for some other reason. |
| quit |
Exits from the debug session. |
| run [file] |
Starts a debugging session by running the specified file. To run the application that the file command previously specified, execute the run command without any options. The run command starts the application in a browser or stand-alone Flash Player. |
| step [N] |
Steps into the application. The optional argument N means do this N times or until the program stops for some other reason. These commands are nonblocking, which means that when they return, the client has at least begun the operation, but it has not necessarily finished it. |
When you start a session, fdb stops execution before Flex renders the application on the screen. Use the continue command to get to the application's starting screen.
The following example shows a sample application after it starts:
(fdb) continue [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] ComboBase: y = undefined text_mc.bl = undefined [trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For m2._FormItem3._RadioButton1 data = undefined label = 2005 [trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For m2._FormItem3._RadioButton2 data = undefined label = 2004 [trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For m2._FormItem3._RadioButton3 data = undefined label = 2005 [trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For m2._FormItem3._RadioButton4 data = undefined label = 2006 [trace] ComboBase: y = 0 text_mc.bl = 12 [trace] ComboBase: y = 0 text_mc.bl = 12 [trace] ComboBase: y = 0 text_mc.bl = 12 [trace] ComboBase: y = 0 text_mc.bl = 14
During the debugging session, you interact with the application in the debugger version of Flash Player. For example, if you select an item from the drop-down list, the debugger continues to output information to the command window:
[trace] SSL : ConfigureScrolling [trace] SSP : 5 51 true 47 [trace] ComboBase: y = 0 text_mc.bl = 14 [trace] layoutChildren : bRowHeightChanged [trace] >>SSL:layoutChildren [trace] deltaRows 5 [trace] rowCount 5 [trace] <<SSL:layoutChildren [trace] >>SSL:draw [trace] bScrollChanged [trace] SSL : ConfigureScrolling [trace] SSP : 5 51 false 46 [trace] SSL Drawing Rows in UpdateControl 5 [trace] <<SSL:draw
You can store commonly used commands in a source file, and then load that file by using the source command. For more information, see Accessing commands from a file.