Chapter 17. Application Debugging

One of the strengths of Flex is its modern debugging. Debugging client-side code in web applications has traditionally been cumbersome. The Flash Debug Player, provided with Flex, allows developers to debug applications in the same way they have been accustomed to with other modern development platforms.

In this chapter, we will cover runtime errors, debugging applications using FDB, debugging applications using the Flex Builder debugger, remote debugging, and tracing and logging.

The Flash Debug Player

The Flash Debug Player is at the core of the debugging capabilities provided to Flex. The Debug Player provides several benefits specific to developers, and is required for most types of debugging you will need to do. The browser plug-in and standalone editions of the Debug Player are included in the free SDK in the /player/debug folder, and in the Path to Flex Builder 2/Player/debug folder if you are using Flex Builder 2. Also, if you installed Flex Builder 2, the Debug Player browser plug-in is typically installed during the install process. You can always check to ensure that you have the latest edition of the Debug Player by visiting http://www.adobe.com/support/flashplayer/downloads.html.

If you are unsure whether you have the Debug Player installed within a browser, you can build a simple application to check the version of the player installed. Here’s an example:

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> ...

Get Programming Flex 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.