Thursday, August 7, 2008

Command Line Debugger Shortcut

After you type "run" in the "(fdb)" command prompt and executed the SWF file to debug, the debugger will load the SWF code. Typing "info sources" or "info file" will bring a list of source files loaded. See the "#' on filename.as#1, well that is a shortcut to the file. Another way to find files and their number shortcut is to:

(fdb) list a

Will bring up all functions that begin with the letter "a" and what file they are in and yes it is case sensitive.

To set a break point simply type:

(fdb) break #19:315

The 315 being the line number you want to break at.
Not sure want line to break at?
List the file like so:

(fdb) list #19

This will list the first 10 lines of code. Repeatedly hitting enter executes the last command without the passed in argument, so it will list the next 10 lines and so on. To skip to a certain location try:

(fdb) list #19:75

Which will jump to the 75th line of code.
Type "continue" to run your SWF. Check out the other options be typing "help" on the "(fdb)" prompt.

Another shortcut that can be used is just typing the first few letters of the command and not the whole command. For example "c" for "continue", "r" for "run", and "b" for "break". "help" displays the shortcuts next to the command in parentheses.

Enjoy!

No comments: