IT tutorials
 
Mobile
 

Developing BlackBerry Tablet Applications with Flex 4.5 : Debug a Flex Mobile Project

10/1/2011 3:36:42 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
Now that you have created your Hello World application and run it via the Run Configurations window, you may wish to debug your application. Fortunately for you, the workflow for debugging a Flex Mobile application is the same as debugging any other Adobe Flex or Adobe AIR application.

Update the HelloWorld.mxml file to include a creationComplete handler as shown in the following code.

<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
firstView="views.HelloWorldHomeView"
creationComplete="viewnavigatorapplication1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;

protected function viewnavigatorapplication1_creationCompleteHandler
(event:FlexEvent):void
{
// TODO Auto-generated method stub
trace("hello world");
}

]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
</s:ViewNavigatorApplication>


We now need to toggle a breakpoint within the application on line 14 to demonstrate a debugging session. To do this, right-click on line 14 within Flash Builder and select Toggle Breakpoint from the context menu. Figure 1 shows this process. A small blue dot will appear in the gutter, showing that the break point is enabled.

Figure 1. Toggle a Breakpoint


We're now ready to debug this application. To do this, right-click on the HelloWorld.mxml file within the Package Explorer, then select Debug As→Mobile Application, as shown in Figure 2. Since this is the first time debugging this application, the Debug Configurations window will open. To debug this using the Flash builder emulator, select “On device” as the Launch method and select a device from the drop-down menu, as shown in Figure 3.

When asked if you would like to switch to the Flash Builder debug perspective, select Yes (see Figure 4). Figure 5 shows the application paused on line 14 within Flash Builder’s debug perspective. You can see the trace message within the console panel. To allow the application to complete, click the Resume button.

Congratulations, you have just completed your first Flash Builder debug session for a Flex Mobile application.

Figure 2. Debug As Mobile Application


Figure 3. Debug Configurations Window


Figure 4. Confirm switch to debug perspective


Figure 5. Hello World application paused on line 14

 
Others
 
- iPhone Application Development : Implementing File System Storage (part 4) - Implementing Object Archiving & Archiving in the Flash Cards
- iPhone Application Development : Implementing File System Storage (part 3) - Implementing the Application Logic
- iPhone Application Development : Implementing File System Storage (part 2) - Adding a Create Card View Controller
- iPhone Application Development : Implementing File System Storage (part 1)
- iPhone Application Development : Understanding the iPhone File System Sandbox
- Enterprise Security on the Mobile OS (part 2) - Application Sandboxing, Signing, and Permissions
- Enterprise Security on the Mobile OS (part 1) - Device Security Options & Encryption
- Mobile Geolocation : Geolocation Implementation & Risks of Geolocation Services
- Windows Phone 7 : Spicing Up the User Interface with the Silverlight Toolkit (part 3)
- Windows Phone 7 : Spicing Up the User Interface with the Silverlight Toolkit (part 2)
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us