
195
17
CHAPTER 17
Debug an Application
This lesson shows you the basic steps of debugging your applications in Adobe Flex Builder.
The debugging tools help you to monitor the state of your application when errors occur. You
can then step line by line through your code, executing each line to inspect and change the
value of local variables, method parameters, and component properties.
In this lesson, you’ll complete the following tasks:
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Create an MXML file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Preview the application in design view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Add a calculation function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Run and test the application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Set a breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Debug the sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Watch a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Correct the coding error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Commentaires sur ces manuels