User Guide
Testing and debugging Flex files 87
4.
If copies of dependent files such as images or other files are not already located on the testing
server, select Yes in the Dependent Files dialog box.
Flex Builder uploads most dependent files to the testing server. The server compiles the
MXML application file using the files on the server. If a dependent file is missing, then the
application file may not compile or may not run properly.
Note: Flex Builder may not upload all dependent files. For more information, see “Uploading
dependent files” on page 87.
After the server is finished compiling, Flex Builder displays the resulting SWF file in a browser.
5.
If you want, try the various components on the page to make sure they work as intended.
6.
If you want, review any compilation errors or warnings in the Output panel in the Results panel
group (Window > Results).
You can use the panel to quickly find and fix the errors. Double-click the error message or the
warning in the panel to open the file in which the error occurred and jump to the line that
caused the error or warning.
For more information on the Output panel, click the Help button in the panel.
7.
To return to the editing environment if using the embedded browser, select one of the view
buttons (Code, Split, Design) in the Document toolbar.
Uploading dependent files
Before running or debugging a file, Flex Builder asks if you want it to upload dependent files to
the server. Dependent files include ActionScript files, MXML files, image files, SWF files, and
other media files.
While Flex Builder will upload most dependent files, it will not upload the following files:
• Any component file referenced by ActionScript in the parent file, such as a pop-up window
component or a cell renderer component
• New or modified ActionScript classes placed in ActionScript packages imported in the
parent file
To upload these files, do the following:
• If you're working directly in the files on the server, click the Refresh button in the browser to
force the server to recompile the files.
• If you're working on the files locally and uploading them to a remote server, upload the
component file to the remote server by clicking it in the Files panel and clicking the Put button
(the blue up arrow) on the panel toolbar.
Debugging ActionScript
You can use the ActionScript debugger to check your code for ActionScript syntax and logical
errors. 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
step to the next breakpoint or step into a function call to see the variable values change.