Debugging Flex

flex-icon.pngAs i have been working with Flex and the Flare library to make a test program to send data from Moodle’s Grade Book to Flash i have ran in to a problem running the Flash debug player.

When i trying to “Debug as Flex Application”, the application would come up in Firefox but in the debug console in Eclipse i would get something along the lines of “Waiting for Flash Player to connect to debugger” and then eventually an error about it failing to connect. If the debugger was working it would provide needed information from the running flash application including text you send back using the trace command.

The problem it seems is that when installing Adobe Flex Builder for Linux, a flash player for Mozilla Firefox is also installed. However the player that was installed was not the debugging version but a normal copy of Flash 9. So it could play compleid Flex applications but not connect to Flex Builder to display needed debugging information. Lucky, although the debugging version for Firefox was not installed a copy of the stand alone debugger was but had not been set up in the path environment variable.

For me the stand alone player was copied to /home/dan/Adobe_Flex_Builder_Linux/Player/linux/flashplayer and all i had to do was add the path /home/dan/Adobe_Flex_Builder_Linux/Player/linux/ to the global path variable and restart the computer (for some reason the path will not update in Eclipse in till you at least log out and back in again). Then to make the “Debug As” command open the application in the stand alone player rather then in Firefox, the path to launch has to be changed from launching the html file to launching the swf file (for me this was a change from /home/dan/workspace/flare_test/bin-debug/flare_test.html to /home/dan/workspace/flare_test/bin-debug/flare_test.swf). This change must be made in Debug Dialog witch you can get to threw the “Debug As” menu. Now when running “Debug As Flex Application” the Flex Application will open in the stand alone player with debugging working and “Run As Flex Application” will open in Firefox using the normal Flash 9 player.

Also it seems that Adobe accepted by application for a educational licenses for Flex Builder, so i no longer have to worry about the time running out or it deactivating witch is nice.

2 Responses to “Debugging Flex”

  1. Carsten Schlipf Says:

    In fact the Adobe Flex Builder for Linux is installing the flash player. Just have a look in the context menu and you’ll see the ‘Debugger’ entry. However there is a bug that disallows the flash player running in Firefox to connect to the flex builder (http://bugs.adobe.com/jira/browse/FBE-312). You are describing the work around. Another workaround according to the thread at http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=657&threadid=1318352&enterthread=y is to use Epiphany as browser.

  2. colin Says:

    overall, flash player management in flex builder for debugging needs vast improvement.

    please vote:
    http://bugs.adobe.com/jira/browse/FB-16735

    thanks!
    colin

Leave a Reply