MACROMEDIA FLEX 2-TESTING FLEX APPLICATIONS WITH MERCURY QUICKTEST PROFESSIONAL Manual de usuario Pagina 13

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 27
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 12
492Debugging
Now that you can control execution, the feature that people generally use the Debug-
ger for is watching variables.
WATCHING VARIABLES
Watching a variable lets you track the value that the variable is assigned in real time.
You can also manually manipulate the value if you want to experiment with how the
application would behave using another value.
Whether you’ve already launched your application or are about to, you can indi-
cate that you want to watch a variable by doing the following:
1 Right-click the variable name.
2 Select Watch.
Once the variable is added, you should see the variable listed in the Expressions view.
Let’s try it:
1 Set a breakpoint on the line indicated in listing 23.6.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
public var myVar:String;
public function setMyVar():void
{
Table 23.4 Flex Builder’s Debugger functions
Icon Function Description
Resume Resumes execution of the application
Suspend Pauses the application
Terminate Terminates the application
Disconnect Disconnects the Debugger from the application
Step Into Steps into the next line of code
Step Over Skips over the next line of code
Step Return Continues the current function until it’s done
Listing 23.6 Using a breakpoint on the line that sets the variable
Vista de pagina 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 26 27

Comentarios a estos manuales

Sin comentarios