Today I added a new feature to Transmission which allows for debugging the java side of your application. The step-by-step details for making it work are as follows (I will be using the TransmissionDemo project in the repo to illustrate this).

1. An optional parameter has been added to the init method of the Flex side of Transmission which by default sets remote debugging to true. Make sure that in production this parameter is set to false.
Transmission init method changes

2. Open up Flash Builder, and import the TransmissionDemo and Transmission projects. Then run the TransmissionDemo project. Now it’s time to set up the Eclipse debugging environment. Minimize the AIR application for now…

3. Open up Eclipse and import the TransmissionDemo and Transmission projects.

4. Now we will setup the remote configuration in Eclipse by going to the Debug Configurations screen. Right click on the TransmissionDemo project -> Debug As -> Debug Configurations

Open the Debug Configurations menu

5. Now let’s set up the connection. First right click on Remote Java Application and choose New. Next make sure the TransmissionDemo project is chosen. Finally choose Standard (Socket attach), host: localhost, and port: 8000 and then click the Debug button.

Remote_Debug

5. Set a breakpoint on the first line of the DemoMessageHandler.java file in the TransmissionDemo project within Eclipse.

6. Return to the TransmissionDemo AIR window and click on the “Send Transmission Message” button.

Open TransmissionDemo and click on the button

7. You should hit your breakpoint.

Breakpoint

8 Responses


  1. agil on 21 Jan 2011

    can transmission as3 used in air application from flash professional or is it just for flex?

    Thanks…

  2. Nate on 06 Feb 2011

    I actually haven’t tried Transmission with Flash Professional. It should work fine, but let me know if you run into any problems.

  3. will on 27 Feb 2011

    I’m getting “Failed to connect to remote VM. Connection refused.” on OSX. No firewall or anything. What could be causing that?

  4. Nate on 27 Feb 2011

    Make sure you start up your AIR app and that Transmission is started up and running before you try to connect with the remote debugger.

  5. will on 01 Mar 2011

    Thanks. Worked. I realize that may be a Noob mistake, however I think it still warrants mention as a “step” above.

  6. Nate on 01 Mar 2011

    Glad it worked! I’ll update the post to be more clear about that.

  7. Q on 07 Jun 2011

    Wouldn’t it be better if debug info went to both the console and a log (rather than just a log?)


Leave your comment



Buy accutane online Michael kors handbags buy accutane online uk replica handbags Buy accutane cheap next handbags satchel handbags Damier Geant kardashian kollection Theme compat buy micardis david jones handbags adalat 30 mg designer replica replica handbags china handbags 2012 leather handbags Gucci Totes hq replica high quality replica handbags