Specifications

CHAPTER 18
350
Debugging with the web-tier compiler
The web-tier compiler has the following debugging-related features:
Detects a query string parameter that you use to invoke the debugger compiler
Controls the number of lines in the output that occur before and after an error or warning
Logs access and error messages
Invoking the debugger compiler
You can compile a debug version of your Flex application when you are using the web-tier compiler. You do this
by appending
?debug=true to the end of the query string; for example:
http://www.myhost.com/myApps/Main.mxml?debug=true
You cannot disable this behavior of the web-tier compiler.
Adding
?debug=true to your query string instructs the compiler to include debugging information in the final
SWF file output. As a result, you can set breakpoints and use other features of the fdb command-line debugger or
the Flex Builder visual debugger.
To debug the application, you launch the fdb command line debugger and then launch your application in the
browser with
?debug=true on the query string. The application connects to the running debugger.
You must have a debugger version of Flash Player to compile the application with debug information in it.
For more information on using fdb, see “Using the Command-Line Debugger on page 245.
$(swf)
Defines the name of the MXML file, minus the extension. For example, if the MXML file is named Main.mxml,
the web-tier compiler inserts
Main where this token occurs.
This token is used by the movie parameter of the <object> tag and the src property of the <embed> tag.
$(width)
Defines the width of the application. The default value is 100%. You set the default value in the
compiler.conf file. If this value is set in the MXML file, then the web-tier compiler uses that value.
This token is used by the width properties of the <object> tag and <embed> tags.
Token Descri pt ion