6
Debugging Applications
WHAT YOU WILL LEARN IN THIS CHAPTER:
- Setting breakpoints in source code and using the Breakpoints panel
- Using the Flash Debug Perspective in Flash Builder
- Utilizing the Variables panel
- Global error handling
- Handling uncaught errors
- Using Try...Catch statements
- Stepping through source code
In this chapter you'll take a closer look at using Flash Builder to debug applications using the Flash Debug Perspective.
Flash Builder offers debugging capabilities that allow you to find bugs within your application. The Debug panel allows you to stop and start the mobile application to find problems, or to examine or substitute values for variables.
This chapter covers example code that intentionally introduces a bug from the outset. You then go through a series of tools and techniques to identify and fix the issue using the Debug Perspective in Flash Builder.
SETTING BREAKPOINTS
In this section you create the Debugging App project in Flash Builder and take a look at setting breakpoints for specific lines in source code.
Setting Breakpoints
The following steps will guide you through using the Flash Debug Perspective. First take a look at utilizing breakpoints in the Source view.
- In Flash Builder create a new Flex Mobile project and call it Debugging App (Figure 6-1).
- In DebuggingAppHome.mxml ...
Get Beginning Flash®, Flex®, and AIR® Development for Mobile Devices 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.