The Flex Debugging perspective

The Flex Debugging perspective contains the tools you need to debug your Flex and ActionScript applications. Like the development perspective, the primary tool within the debugging perspective is the editor. In the context of debugging your applications, the editor works with the debugging tools to locate and highlight lines of code that need attention so that you can fix them and continue testing your application.

For example, you can set breakpoints in your script to stop the execution of the script so that you can inspect the values of variables and other information up to that point. You can also move to the next breakpoint or step in to a function call to see the variable values change.


Debugging perspective

The debugging perspective appears automatically when the first breakpoint is reached. You can also switch to the debugging perspective manually by selecting it from the Perspective bar, which is located at the right edge of the main workbench toolbar.

The debugging perspective contains the following views.

The Debug view

The Debug view (in other debuggers this is sometimes referred to as the callstack) displays the stack frame of the suspended thread of the Flex application you are debugging. You use the Debug view to manage the debugging process. For example, the Debug view allows you to resume or suspend the thread, step into and over code statements, and so on.


Debug view

For more information about working with the debug view, see Managing the debugging session in the Debug view.

Flex applications are single-threaded (not multi-threaded like Java, for example) and you can debug only one Flex application at a time. Therefore, when you debug a Flex application, you see only the processes and debug view for a single thread of execution.

The Debug view shows a list of all the functions called to that point, in the order called. For example, the first function called is at the bottom of the list. You can double-click a function to move to it in the script; Flex Builder updates the information in the Variables view to reflect the new location in the script.

The Breakpoints view

The Breakpoints view lists all of the breakpoints you set in your project. You can double-click a breakpoint and display its location in the editor. You can also disable, skip, and remove breakpoints.


Breakpoints view

For more information, see Managing breakpoints in the Breakpoints view.

The Console view

The Console view displays the output from trace statements placed in your ActionScript code, and also feedback from the debugger itself (status, warnings, errors, and so on). The Console view serves the same purpose as the output panel in Flex Builder 1.5.


Console view

For more information, see Using the Console view.

The Variables view

The Variables view displays information about the variables in the currently-selected stack frame and serves the same purpose as the locals window does in other debuggers (including Flex Builder 1.5). You can select variables to watch (in the Expressions view) and also change variable values during the debugging session and see the changes in the currently running SWF file, to experiment with fixes for the problem you're trying to resolve.


Variables view

For more information, see Managing variables in the Variables view.

The Expressions view

The Expressions view is used to monitor a set of critical variables and serves the same purpose as the watch window does in other debuggers (in Flex Builder 1.5 this was referred to as the watch list). You can choose the variables you consider critical in the Variables view and add them to and monitor (watch) them in the Expressions view.


Expressions view

When you debug your application, you can then monitor and, if needed, modify the values. You can also add and remove variables in the Expressions view. For more information, see Using the Expressions view.

For more information about debugging Flex and ActionScript applications, see Running and Debugging Applications.

Related topics


Flex 2.01

Take a survey