Debug a Flex Mobile Project

Must Read

Canon 7D Set Your RAW/JPEG Image Quality

If you are upgrading from a digital point-and-shoot camera to the 7D, then you are already familiar with the...

Government Debt Relief Loans – Can Obama’s Federal Bailout Stimulus Programs Help Me?

The vast majority of Americans are experiencing the impact of the financial crisis that is currently choking the economy. ...

Foreclosures With Home Equity Credit Lines Too

More people in America are missing payments on their home equity loans than at any time in this decade,...

Thoughts on Paying For College Beyond Just Loans

You've made it through all of it - high school, prom, applications - and now you have finally been...

Different Types of Home Loans

We list below a brief explanation of each of the more common types of home loans available to home...

File System Access

Just as in the desktop version of Adobe AIR, AIR on Android gives you access to the file system....

Now that you have created your Hello World application and ran it using 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 here:

<?xml version=”1.0″ encoding=”utf-8″?>
protectedfunction viewnavigatorapplication1_creationCompleteHandler
// TODO Auto-generated method stub
trace(“hello world”);
<!– Place non-visual elements (e.g., services, value objects) here –>

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-11 shows this process. A small blue dot will appear in the gutter, showing that the break point is enabled.

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

Toggling a breakpoint

Debugging an application on a mobile device

The Debug Configurations window

When asked if you would like to switch to the Flash Builder debug perspective, select “Yes” (see Figure 1-14). Figure 1-15 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.

Confirming the switch to debug perspective

The Hello World application paused on line 14

Latest News

Digital Marketing for Beginners

Digital marketing for starter, Let to basic learning about connecting with your audience in the right place at the...

More Articles Like This