Flash Builder Burrito Launch Configurations for PlayBook (package, deploy, debug, & uninstall)

Posted on November 22, 2010 | Comments Off

UPDATE 2010-12-01: There is a Flash Builder Burrito plugin for BlackBerry Tablet OS available now. Read this post to find out more info.

This is an update to the my previous post that only provided information for one Package and Deploy launch configuration for Flash Builder Burrito preview.

In this post I’ll provide launch configurations and instructions to package, deploy, debug, and uninstall PlayBook applications from within Flash Builder Burrito preview.

First Create Some Variables
With three configuration files that all use some common values, ie: PlayBook’s device IP, it made sense to create some eclipse variables to use within the launch configurations. The launch settings use two variables called PLAYBOOK_IP and PLAYBOOK_DEBUGHOST.

In Flash Builder Burrito, click on Preferences -> Run/Debug -> String Substitution. Then continue by clicking the New button and adding the two variables. PLAYBOOK_IP is the IP address value from the PlayBook simulator and the PLAYBOOK_DEBUGHOST is the IP of your local computer (in my case I am using a NAT network VMWare setup so I provide it the NAT-ted VMWare computer IP). Here is a screen shot of my variable values:

Download and Install Launch Configurations
Download these files for your OS.
Win:

Mac:

Save all the launch files in a folder and make note of the folder location.
Then in Flash Builder Burrito follow these steps:

  • File -> Import… -> Other… -> Run/Debug -> Launch Configurations click the Next button.
  • Click on the Browse… button and navigate to the folder that the launch file is located.
  • Click on this folder in the left panel (not the checkbox but the folder name). You should see the the three launch files appear in the right panel.
  • Check all the launch configurations options and click the Finish button.

This puts all the launch configuration options into your External Tools favorites. In Flash Builder Burrito preview this will look like this:

Debug Steps
To debug an application using the Package And Debug launch configuration an extra step is required to put Flash Builder into the proper debug session state. The idea of this is described in my previous post. And for the small differences in the current Flash Builder Burrito I’ll repeat the steps here.

First step is to configure the debug launch button to launch a debug session without loading the local SWF. In Flash Builder Burrito with my test project called MobileExample I clicked on the Debug Launch icon’s side arrow and drop down to the “Other …” button. Here is the screenshot:

Since the project is a new Burrito Flex Mobile project type there is some hacking to be done to make it launch the debugger without launching the AIR in the mobile emulator mode. First select the “Web Application” drop down list, then right click and select the New icon, as seen in the picture below:

Now fill out the new launch configuration with the appropriate project name “MobileExample” and “about:blank” in the “URL or path launch” options. Note you might see an error that says “Project must be an ActionScript or Flex project.” but you can ignore the warning and hit apply. It should look like this:

Now when you want to debug a playbook application first launch MobileExampleDebug to get Flash Builder Burrito to start debug session, then click on the External Tools launch configuration “Package And Debug”.

NOTES:You will see the PlayBook application launch in the PlayBook simulator and display the default BlackBerry icon screen until it connects. PlayBook takes 3-6 seconds to make the connection back to the Flash Builder debugger session, it sits there for over 20 secs you probably are not setting the IP’s correctly and the connection is not being made. In that case double check your VMWare network setup and make sure that both (Flash Builder computer and PlayBook simulator) can communicate directly to each other