Testing a movie > Using the Debugger > Setting and removing breakpoints |  |

Setting and removing breakpoints

A breakpoint allows you to stop a movie running in the Flash Player at a specific line of ActionScript. You can use breakpoints to test possible trouble spots in your code. For example, if you've written a set of `if..else if` statements and can't determine which one is executing, you can add a breakpoint before the statements and step through them one by one in the Debugger.

You can set breakpoints in the Actions panel or in the Debugger. Breakpoints set in the Actions panel are saved with the Flash document (FLA) file. Breakpoints set in the Debugger are not saved in the FLA file and are valid only for the current debugging session.

To set and remove breakpoints in the Actions panel:

1 | In the Script pane, select the line of code on which you want to set or remove a breakpoint.
2 | Do one of the following:
| Click the Debug Options button above the Script pane.
| Right-click (Windows) or Control-click (Macintosh) to display the context menu.
| Press Control+Shift+B (Windows) or Command+Shift+B (Macintosh).
3 | Choose Set Breakpoint, Remove Breakpoint, or Remove All Breakpoints.

To set and remove breakpoints in the Debugger:

1 | In the Actions panel's Script pane, select the line of code on which you want to set or remove a breakpoint.
2 | Do one of the following:
| In the Debugger, click the Toggle Breakpoint or Remove All Breakpoints button above the code view.
| In the Debugger, right-click (Windows) or Control-click (Macintosh) to display the context menu, and choose Breakpoint, Remove Breakpoint, or Remove All Breakpoints.
| Click in the Debugger window, and press Control+Shift+B (Windows) or Command+Shift+B (Macintosh).
| Once the Flash Player is stopped at a breakpoint, you can step into, step over, or step out of that line of code. (See Stepping through lines of code.) If you set a breakpoint in a comment or on an empty line in the Actions panel, the breakpoint is ignored.