2 Replies Latest reply on Jul 6, 2009 6:38 AM by froboz99

    Flex Builder 3: first directions in debugging / tracing applications

    froboz99

      Hi all,

       

      I'm sure this is a rather trivial question, but I've spent some time on it and still can't figure out how to move forward.

       

      I've created this very little ActionScript project, using Flex Builder 3 for linux.

       

      This is the code of the simple application I'm writing:

      -------------------------------8<------------------------------------------

      package {
          import flash.display.Sprite;

       

          public class HelloAction extends Sprite
          {
              public function HelloAction()
              {
                  trace("Hello world!!");
              }
          }
      }

      -------------------------------8<------------------------------------------

       

      When I click on the Run button, the flashplayer is executed on the compiled swf file, and I get the application run on an

      empty stage, which is afterall what I expect, still I have no idea where the trace message should appear.

       

      Then I tried to click on the "Debug" button, I can see in the progress view something happening with my fine app, something like:

      Launching HelloAction:

      [BAR]

      Launching: Waiting for Flash Player to connect to debugger

       

      and the bar slowingly filling itself, then finally I got this message:

       

      |Failed to connect; session timed out.
      |Ensure that:
      |  1. You compiled your Flash application with debugging on.
      |  2. You are running the debugger version of Flash Player.

       

      Can someone provide some hint?

      What am I supposed to do in order to be able to simply see the trace messages?

       

      Regards.

        • 1. Re: Flex Builder 3: first directions in debugging / tracing applications
          *Prashant Shelke* Level 4

          trace will be available only for SWF compiled with -debug=true setting.


          Right-click on project -> Properties --> Flex compiler --> Additional compiler arguments --> add -debug=true.


          Clean project & try to debug u will see trace logs on colsole view in eclipse & also ensure you have installed Debug version of Flash player or no.

          • 2. Re: Flex Builder 3: first directions in debugging / tracing applications
            froboz99 Level 1

            Hi, and thanks for the reply.

             

            I did this:

            Right-click on project -> Properties --> Flex compiler --> Additional compiler arguments --> add -debug=true.

             

             

            and compiled, apparently without problems.

             

            Then I got a flashplayer debug version from this url:

            http://www.adobe.com/support/flashplayer/downloads.html#fp9

             

            And I installed it in the path.

             

            Now I have:

            $ which flashplayer -a
            /opt/adobe/flash-player-dev-9/standalone/debugger/flashplayer
            $ /opt/adobe/flash-player-dev-9/standalone/debugger/flashplayer foo

             

            Error: Invalid SWF file name

             

            But then again when I try to click on the Run button I can see no application launched, and when I try the Debug button I get the

            same problem as  before, with the funky progress bar "Launching HelloAction" slightly progressing and then ending up with the usual timeout message:

            |Failed to connect; session timed out.
            |Ensure that:
            |  1. You compiled your Flash application with debugging on.
            |  2. You are running the debugger version of Flash Player.

             

            Yes I also tried to clean the project.

             

            Any other suggestions? Is it possible that this "feature" is not supported in Linux?

             

            Regards.