Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 25. Using the AVM2 Debugger > Taking Control of Execution

25.3. Taking Control of Execution

To start a debugging session, you compile a SWF, launch it in a debugger version of the Flash Player, and connect a debugger to it. Although you're all set to debug now, nothing might happen. By default, the program runs normally. As the director, you need an opportunity to step in and yell "Cut!" before you can start working on a particular bug. This is called breaking the program (break as in "taking a break" more than "Honey, I broke that dachshund gravy boat you love"), or halting execution. There are three ways to transfer control between normal execution and interactive debugging.

25.3.1. Stopping at an Uncaught Exception

If your debugging session started properly, when things go catastrophically wrong, you will be handed the director's bullhorn and have an opportunity to step in. Uncaught exceptions, which without a debugger connected might pop up a dialog box, now automatically break the execution of the program right where the error occurs. Figure 25-2 shows a program halted because of an uncaught exception.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial