One of the central abilities in debugging applications is setting breakpoints for a specific line of ActionScript. A breakpoint is similar to setting a place for your Flex application to pause. By pausing the application, you can then view a snapshot of the application’s current state.
In Flex Builder there are several ways to manage breakpoints:
Set or remove a breakpoint by selecting the desired line in the line numbers column and by using Control-click:
Figure 1. The breakpoints appear in the line numbers column
The line numbers column is the vertical section of the Flex Builder Code view that contains the line numbers and breakpoints. This section of the Code view also displays the currently set breakpoints and the current active line when the debugger pauses within your application. To remove a breakpoint, you also use Control-click.
Set or remove a breakpoint by placing your pointer on a desired line and right-clicking. When the context menu appears, notice the menu option, Set Breakpoint. If you have already set a breakpoint for the selected line set, you can select the remove breakpoint option.
Figure 2. Set or remove a breakpoint with a right-click
Set or remove breakpoints from the Edit menu. To use this option, put your pointer on the desired line and choose View > Set Breakpoint. To remove a breakpoint you can follow the same steps but select Remove breakpoint. If you prefer to use keyboard shortcuts, press Control+Alt+B to add/remove breakpoints.
In the process of debugging a Flex application, you often end up setting many breakpoints. Instead of removing each breakpoint individually, you can remove all the breakpoints from a selected document by selecting the Edit > Remove All Breakpoints in File option or right-clicking Code view and selecting Remove All Breakpoints in File.