lash Builder 4 compared to the previous version of the breakpoints increased compared intimate way - conditional breakpoint. What specifically does that mean? That is, before we are in the breakpoints, the program always stops execution to every one, but sometimes the debugging cycle, each time to stop all have to "process", very easy to operate, and now this newly added conditional breakpoint, you can follow 3 different ways to debug, it is convenient, let's look at how to operate.
First, make sure the system is already installed FLASH PLAYER DEBUG version, if not can go to Adobe official website to download.
Write a for loop code, in trace (abc); the line to break, and then right-click the breakpoint and select "Breakpoint Properties."
private function test (): void
var abc: int = 0;
var efg: int = 0;
for (var i: int = 0; i <100; i + +)
abc = i +5;
if (abc> 50)
efg + +;
In the dialog box we can see that the conditions set breakpoint interface. We can see that the breakpoint is divided into three categories: hit count breakpoint, the breakpoint condition is true, the value change breakpoint.
Hit count breakpoint, that breakpoint number of lines of code to be executed consistent with the set value, the program stops at the breakpoint location. We will count to 10, that trace (abc); to be executed when the program will be the tenth suspended.
Breakpoint condition is true, that when the conditions are met in the set expression, and the operator return value is true, the program stops at the breakpoint location. We will abc == 9 as a condition, "pending condition occurs," select "when the condition is true."
Breakpoint value changes, the set of variables in the program is running if the value is changed, the program stops at the breakpoint location. We will as a condition variable variable efg "place pending conditions" select "change the value of the conditions."