As you step through lines of code, the values of variables and properties change in the Watch list
and in the Variables, Locals, and Properties tabs. A yellow arrow along the left side of the
Debugger's code view indicates the line at which the Debugger stopped. Use the following
buttons along the top of the code view:
Continue
Stop Debugging
Step In
advances the Debugger (indicated by the yellow arrow) into a function. Step In works
only for user-defined functions.
In the following example, if you place a breakpoint at line 7 and click Step In, the Debugger
advances to line 2, and a subsequent click of Step In will advance you to line 3. Clicking Step In
for lines that do not have user-defined functions in them advances the Debugger over a line of
code. For example, if you stop at line 2 and select Step In, the Debugger advances to line 3, as
shown in the following example:
1 function myFunction() {
2 x = 0;
3 y = 0;
4 }
5
6 mover = 1;
7 myFunction();
8 mover = 0;
Step Out
advances the Debugger out of a function. This button works only if you are currently
stopped in a user-defined function; it moves the yellow arrow to the line after the one where that
function was called. In the example above, if you place a breakpoint at line 3 and click Step Out,
the Debugger moves to line 8. Clicking Step Out at a line that is not within a user-defined
function is the same as clicking Continue. For example, if you stop at line 6 and click Step Out,
the player continues executing the script until it encounters a breakpoint.
Step Over
advances the Debugger over a line of code. This button moves the yellow arrow to the
next line in the script and ignores any user-defined functions. In the example above, if you are
stopped at line 7 and click Step Over, you go directly to line 8, and
Continue
leaves the line at which the player is stopped and continues playing until a breakpoint
is reached.
Stop Debugging
76
Chapter 3: Writing and Debugging Scripts
Toggle Breakpoint
Remove All Breakpoints
Step Over
makes the Debugger inactive but continues to play the SWF file in Flash Player.
Step Out
Step In
is ignored.
myFunction()
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers